admin_auth_api

package
v0.0.0-...-c756e77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminAuthApi_PreAuth_FullMethodName   = "/admin_auth_api.AdminAuthApi/preAuth"
	AdminAuthApi_Auth_FullMethodName      = "/admin_auth_api.AdminAuthApi/auth"
	AdminAuthApi_KeepAlive_FullMethodName = "/admin_auth_api.AdminAuthApi/keepAlive"
)

Variables

View Source
var (
	PreAuthResponse_CODE_name = map[int32]string{
		0: "CODE_OK",
		1: "CODE_NO_USER",
	}
	PreAuthResponse_CODE_value = map[string]int32{
		"CODE_OK":      0,
		"CODE_NO_USER": 1,
	}
)

Enum value maps for PreAuthResponse_CODE.

View Source
var (
	AuthResponse_CODE_name = map[int32]string{
		0: "CODE_OK",
		1: "CODE_WRONG_SESSION",
		2: "CODE_WRONG_SIGN",
	}
	AuthResponse_CODE_value = map[string]int32{
		"CODE_OK":            0,
		"CODE_WRONG_SESSION": 1,
		"CODE_WRONG_SIGN":    2,
	}
)

Enum value maps for AuthResponse_CODE.

View Source
var (
	KeepAliveResponse_CODE_name = map[int32]string{
		0: "CODE_OK",
		1: "CODE_WRONG_SESSION",
		2: "CODE_NOT_AUTH",
	}
	KeepAliveResponse_CODE_value = map[string]int32{
		"CODE_OK":            0,
		"CODE_WRONG_SESSION": 1,
		"CODE_NOT_AUTH":      2,
	}
)

Enum value maps for KeepAliveResponse_CODE.

View Source
var AdminAuthApi_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin_auth_api.AdminAuthApi",
	HandlerType: (*AdminAuthApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "preAuth",
			Handler:    _AdminAuthApi_PreAuth_Handler,
		},
		{
			MethodName: "auth",
			Handler:    _AdminAuthApi_Auth_Handler,
		},
		{
			MethodName: "keepAlive",
			Handler:    _AdminAuthApi_KeepAlive_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin_auth_api.proto",
}

AdminAuthApi_ServiceDesc is the grpc.ServiceDesc for AdminAuthApi service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_admin_auth_api_proto protoreflect.FileDescriptor

Functions

func RegisterAdminAuthApiServer

func RegisterAdminAuthApiServer(s grpc.ServiceRegistrar, srv AdminAuthApiServer)

Types

type AdminAuthApiClient

type AdminAuthApiClient interface {
	// 预验证
	PreAuth(ctx context.Context, in *PreAuthRequest, opts ...grpc.CallOption) (*PreAuthResponse, error)
	// 验证
	Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	// 保活
	KeepAlive(ctx context.Context, in *KeepAliveRequest, opts ...grpc.CallOption) (*KeepAliveResponse, error)
}

AdminAuthApiClient is the client API for AdminAuthApi service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAdminAuthApiClient

func NewAdminAuthApiClient(cc grpc.ClientConnInterface) AdminAuthApiClient

type AdminAuthApiServer

type AdminAuthApiServer interface {
	// 预验证
	PreAuth(context.Context, *PreAuthRequest) (*PreAuthResponse, error)
	// 验证
	Auth(context.Context, *AuthRequest) (*AuthResponse, error)
	// 保活
	KeepAlive(context.Context, *KeepAliveRequest) (*KeepAliveResponse, error)
	// contains filtered or unexported methods
}

AdminAuthApiServer is the server API for AdminAuthApi service. All implementations must embed UnimplementedAdminAuthApiServer for forward compatibility

type AuthRequest

type AuthRequest struct {
	AdminSessionId string     `protobuf:"bytes,1,opt,name=adminSessionId,proto3" json:"adminSessionId,omitempty"`
	Sign           *Signature `protobuf:"bytes,2,opt,name=sign,proto3" json:"sign,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthRequest) Descriptor deprecated

func (*AuthRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.

func (*AuthRequest) GetAdminSessionId

func (x *AuthRequest) GetAdminSessionId() string

func (*AuthRequest) GetSign

func (x *AuthRequest) GetSign() *Signature

func (*AuthRequest) ProtoMessage

func (*AuthRequest) ProtoMessage()

func (*AuthRequest) ProtoReflect

func (x *AuthRequest) ProtoReflect() protoreflect.Message

func (*AuthRequest) Reset

func (x *AuthRequest) Reset()

func (*AuthRequest) String

func (x *AuthRequest) String() string

type AuthResponse

type AuthResponse struct {
	Code   AuthResponse_CODE `protobuf:"varint,1,opt,name=code,proto3,enum=admin_auth_api.AuthResponse_CODE" json:"code,omitempty"`
	ErrMsg string            `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthResponse) Descriptor deprecated

func (*AuthResponse) Descriptor() ([]byte, []int)

Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.

func (*AuthResponse) GetCode

func (x *AuthResponse) GetCode() AuthResponse_CODE

func (*AuthResponse) GetErrMsg

func (x *AuthResponse) GetErrMsg() string

func (*AuthResponse) ProtoMessage

func (*AuthResponse) ProtoMessage()

func (*AuthResponse) ProtoReflect

func (x *AuthResponse) ProtoReflect() protoreflect.Message

func (*AuthResponse) Reset

func (x *AuthResponse) Reset()

func (*AuthResponse) String

func (x *AuthResponse) String() string

type AuthResponse_CODE

type AuthResponse_CODE int32
const (
	AuthResponse_CODE_OK            AuthResponse_CODE = 0
	AuthResponse_CODE_WRONG_SESSION AuthResponse_CODE = 1
	AuthResponse_CODE_WRONG_SIGN    AuthResponse_CODE = 2
)

func (AuthResponse_CODE) Descriptor

func (AuthResponse_CODE) Enum

func (AuthResponse_CODE) EnumDescriptor deprecated

func (AuthResponse_CODE) EnumDescriptor() ([]byte, []int)

Deprecated: Use AuthResponse_CODE.Descriptor instead.

func (AuthResponse_CODE) Number

func (AuthResponse_CODE) String

func (x AuthResponse_CODE) String() string

func (AuthResponse_CODE) Type

type KeepAliveRequest

type KeepAliveRequest struct {
	AdminSessionId string `protobuf:"bytes,1,opt,name=adminSessionId,proto3" json:"adminSessionId,omitempty"`
	// contains filtered or unexported fields
}

func (*KeepAliveRequest) Descriptor deprecated

func (*KeepAliveRequest) Descriptor() ([]byte, []int)

Deprecated: Use KeepAliveRequest.ProtoReflect.Descriptor instead.

func (*KeepAliveRequest) GetAdminSessionId

func (x *KeepAliveRequest) GetAdminSessionId() string

func (*KeepAliveRequest) ProtoMessage

func (*KeepAliveRequest) ProtoMessage()

func (*KeepAliveRequest) ProtoReflect

func (x *KeepAliveRequest) ProtoReflect() protoreflect.Message

func (*KeepAliveRequest) Reset

func (x *KeepAliveRequest) Reset()

func (*KeepAliveRequest) String

func (x *KeepAliveRequest) String() string

type KeepAliveResponse

type KeepAliveResponse struct {
	Code   KeepAliveResponse_CODE `protobuf:"varint,1,opt,name=code,proto3,enum=admin_auth_api.KeepAliveResponse_CODE" json:"code,omitempty"`
	ErrMsg string                 `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg,omitempty"`
	// contains filtered or unexported fields
}

func (*KeepAliveResponse) Descriptor deprecated

func (*KeepAliveResponse) Descriptor() ([]byte, []int)

Deprecated: Use KeepAliveResponse.ProtoReflect.Descriptor instead.

func (*KeepAliveResponse) GetCode

func (*KeepAliveResponse) GetErrMsg

func (x *KeepAliveResponse) GetErrMsg() string

func (*KeepAliveResponse) ProtoMessage

func (*KeepAliveResponse) ProtoMessage()

func (*KeepAliveResponse) ProtoReflect

func (x *KeepAliveResponse) ProtoReflect() protoreflect.Message

func (*KeepAliveResponse) Reset

func (x *KeepAliveResponse) Reset()

func (*KeepAliveResponse) String

func (x *KeepAliveResponse) String() string

type KeepAliveResponse_CODE

type KeepAliveResponse_CODE int32
const (
	KeepAliveResponse_CODE_OK            KeepAliveResponse_CODE = 0
	KeepAliveResponse_CODE_WRONG_SESSION KeepAliveResponse_CODE = 1
	KeepAliveResponse_CODE_NOT_AUTH      KeepAliveResponse_CODE = 2
)

func (KeepAliveResponse_CODE) Descriptor

func (KeepAliveResponse_CODE) Enum

func (KeepAliveResponse_CODE) EnumDescriptor deprecated

func (KeepAliveResponse_CODE) EnumDescriptor() ([]byte, []int)

Deprecated: Use KeepAliveResponse_CODE.Descriptor instead.

func (KeepAliveResponse_CODE) Number

func (KeepAliveResponse_CODE) String

func (x KeepAliveResponse_CODE) String() string

func (KeepAliveResponse_CODE) Type

type PreAuthRequest

type PreAuthRequest struct {
	UserName string `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"`
	// contains filtered or unexported fields
}

func (*PreAuthRequest) Descriptor deprecated

func (*PreAuthRequest) Descriptor() ([]byte, []int)

Deprecated: Use PreAuthRequest.ProtoReflect.Descriptor instead.

func (*PreAuthRequest) GetUserName

func (x *PreAuthRequest) GetUserName() string

func (*PreAuthRequest) ProtoMessage

func (*PreAuthRequest) ProtoMessage()

func (*PreAuthRequest) ProtoReflect

func (x *PreAuthRequest) ProtoReflect() protoreflect.Message

func (*PreAuthRequest) Reset

func (x *PreAuthRequest) Reset()

func (*PreAuthRequest) String

func (x *PreAuthRequest) String() string

type PreAuthResponse

type PreAuthResponse struct {
	Code           PreAuthResponse_CODE `protobuf:"varint,1,opt,name=code,proto3,enum=admin_auth_api.PreAuthResponse_CODE" json:"code,omitempty"`
	ErrMsg         string               `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg,omitempty"`
	AdminSessionId string               `protobuf:"bytes,3,opt,name=adminSessionId,proto3" json:"adminSessionId,omitempty"`
	ToSignStr      string               `protobuf:"bytes,4,opt,name=toSignStr,proto3" json:"toSignStr,omitempty"`
	// contains filtered or unexported fields
}

func (*PreAuthResponse) Descriptor deprecated

func (*PreAuthResponse) Descriptor() ([]byte, []int)

Deprecated: Use PreAuthResponse.ProtoReflect.Descriptor instead.

func (*PreAuthResponse) GetAdminSessionId

func (x *PreAuthResponse) GetAdminSessionId() string

func (*PreAuthResponse) GetCode

func (*PreAuthResponse) GetErrMsg

func (x *PreAuthResponse) GetErrMsg() string

func (*PreAuthResponse) GetToSignStr

func (x *PreAuthResponse) GetToSignStr() string

func (*PreAuthResponse) ProtoMessage

func (*PreAuthResponse) ProtoMessage()

func (*PreAuthResponse) ProtoReflect

func (x *PreAuthResponse) ProtoReflect() protoreflect.Message

func (*PreAuthResponse) Reset

func (x *PreAuthResponse) Reset()

func (*PreAuthResponse) String

func (x *PreAuthResponse) String() string

type PreAuthResponse_CODE

type PreAuthResponse_CODE int32
const (
	PreAuthResponse_CODE_OK      PreAuthResponse_CODE = 0
	PreAuthResponse_CODE_NO_USER PreAuthResponse_CODE = 1
)

func (PreAuthResponse_CODE) Descriptor

func (PreAuthResponse_CODE) Enum

func (PreAuthResponse_CODE) EnumDescriptor deprecated

func (PreAuthResponse_CODE) EnumDescriptor() ([]byte, []int)

Deprecated: Use PreAuthResponse_CODE.Descriptor instead.

func (PreAuthResponse_CODE) Number

func (PreAuthResponse_CODE) String

func (x PreAuthResponse_CODE) String() string

func (PreAuthResponse_CODE) Type

type Signature

type Signature struct {
	Format string `protobuf:"bytes,1,opt,name=format,proto3" json:"format,omitempty"`
	Blob   []byte `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"`
	Rest   []byte `protobuf:"bytes,3,opt,name=rest,proto3" json:"rest,omitempty"`
	// contains filtered or unexported fields
}

func (*Signature) Descriptor deprecated

func (*Signature) Descriptor() ([]byte, []int)

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetBlob

func (x *Signature) GetBlob() []byte

func (*Signature) GetFormat

func (x *Signature) GetFormat() string

func (*Signature) GetRest

func (x *Signature) GetRest() []byte

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect

func (x *Signature) ProtoReflect() protoreflect.Message

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) String

func (x *Signature) String() string

type UnimplementedAdminAuthApiServer

type UnimplementedAdminAuthApiServer struct {
}

UnimplementedAdminAuthApiServer must be embedded to have forward compatible implementations.

func (UnimplementedAdminAuthApiServer) Auth

func (UnimplementedAdminAuthApiServer) KeepAlive

func (UnimplementedAdminAuthApiServer) PreAuth

type UnsafeAdminAuthApiServer

type UnsafeAdminAuthApiServer interface {
	// contains filtered or unexported methods
}

UnsafeAdminAuthApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdminAuthApiServer will result in compilation errors.

Source Files

  • admin_auth_api.pb.go
  • admin_auth_api_grpc.pb.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL