shield

package
v0.0.80 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShieldRpcService_Ping_FullMethodName             = "/shield.ShieldRpcService/Ping"
	ShieldRpcService_AuthLoginWithApi_FullMethodName = "/shield.ShieldRpcService/AuthLoginWithApi"
	ShieldRpcService_RefreshToken_FullMethodName     = "/shield.ShieldRpcService/RefreshToken"
)

Variables

View Source
var File_shield_proto protoreflect.FileDescriptor
View Source
var ShieldRpcService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shield.ShieldRpcService",
	HandlerType: (*ShieldRpcServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _ShieldRpcService_Ping_Handler,
		},
		{
			MethodName: "AuthLoginWithApi",
			Handler:    _ShieldRpcService_AuthLoginWithApi_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _ShieldRpcService_RefreshToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shield.proto",
}

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

Functions

func RegisterShieldRpcServiceServer added in v0.0.51

func RegisterShieldRpcServiceServer(s grpc.ServiceRegistrar, srv ShieldRpcServiceServer)

Types

type AuthApiParams

type AuthApiParams struct {
	AccessKey    string `protobuf:"bytes,1,opt,name=AccessKey,proto3" json:"AccessKey,omitempty"`
	AccessSecret string `protobuf:"bytes,2,opt,name=AccessSecret,proto3" json:"AccessSecret,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthApiParams) Descriptor deprecated

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

Deprecated: Use AuthApiParams.ProtoReflect.Descriptor instead.

func (*AuthApiParams) GetAccessKey

func (x *AuthApiParams) GetAccessKey() string

func (*AuthApiParams) GetAccessSecret

func (x *AuthApiParams) GetAccessSecret() string

func (*AuthApiParams) ProtoMessage

func (*AuthApiParams) ProtoMessage()

func (*AuthApiParams) ProtoReflect

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

func (*AuthApiParams) Reset

func (x *AuthApiParams) Reset()

func (*AuthApiParams) String

func (x *AuthApiParams) String() string

type AuthApiResp

type AuthApiResp struct {
	Code int32            `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string           `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data *AuthApiRespData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthApiResp) Descriptor deprecated

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

Deprecated: Use AuthApiResp.ProtoReflect.Descriptor instead.

func (*AuthApiResp) GetCode

func (x *AuthApiResp) GetCode() int32

func (*AuthApiResp) GetData

func (x *AuthApiResp) GetData() *AuthApiRespData

func (*AuthApiResp) GetMsg

func (x *AuthApiResp) GetMsg() string

func (*AuthApiResp) ProtoMessage

func (*AuthApiResp) ProtoMessage()

func (*AuthApiResp) ProtoReflect

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

func (*AuthApiResp) Reset

func (x *AuthApiResp) Reset()

func (*AuthApiResp) String

func (x *AuthApiResp) String() string

type AuthApiRespData

type AuthApiRespData struct {
	RequestID           string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"`
	TenantID            uint32 `protobuf:"varint,2,opt,name=TenantID,proto3" json:"TenantID,omitempty"`
	Account             string `protobuf:"bytes,3,opt,name=Account,proto3" json:"Account,omitempty"`
	TrueName            string `protobuf:"bytes,4,opt,name=TrueName,proto3" json:"TrueName,omitempty"`
	Mobile              string `protobuf:"bytes,5,opt,name=Mobile,proto3" json:"Mobile,omitempty"`
	Email               string `protobuf:"bytes,6,opt,name=Email,proto3" json:"Email,omitempty"`
	Identity            int32  `protobuf:"varint,7,opt,name=Identity,proto3" json:"Identity,omitempty"`
	LastLogin           int64  `protobuf:"varint,8,opt,name=LastLogin,proto3" json:"LastLogin,omitempty"`
	ThisLogin           int64  `protobuf:"varint,9,opt,name=ThisLogin,proto3" json:"ThisLogin,omitempty"`
	AccessKey           string `protobuf:"bytes,10,opt,name=AccessKey,proto3" json:"AccessKey,omitempty"`
	AccessToken         string `protobuf:"bytes,11,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"`
	AccessTokenExpires  int64  `protobuf:"varint,12,opt,name=AccessTokenExpires,proto3" json:"AccessTokenExpires,omitempty"`
	RefreshToken        string `protobuf:"bytes,13,opt,name=RefreshToken,proto3" json:"RefreshToken,omitempty"`
	RefreshTokenExpires int64  `protobuf:"varint,14,opt,name=RefreshTokenExpires,proto3" json:"RefreshTokenExpires,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthApiRespData) Descriptor deprecated

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

Deprecated: Use AuthApiRespData.ProtoReflect.Descriptor instead.

func (*AuthApiRespData) GetAccessKey

func (x *AuthApiRespData) GetAccessKey() string

func (*AuthApiRespData) GetAccessToken

func (x *AuthApiRespData) GetAccessToken() string

func (*AuthApiRespData) GetAccessTokenExpires

func (x *AuthApiRespData) GetAccessTokenExpires() int64

func (*AuthApiRespData) GetAccount

func (x *AuthApiRespData) GetAccount() string

func (*AuthApiRespData) GetEmail

func (x *AuthApiRespData) GetEmail() string

func (*AuthApiRespData) GetIdentity

func (x *AuthApiRespData) GetIdentity() int32

func (*AuthApiRespData) GetLastLogin

func (x *AuthApiRespData) GetLastLogin() int64

func (*AuthApiRespData) GetMobile

func (x *AuthApiRespData) GetMobile() string

func (*AuthApiRespData) GetRefreshToken

func (x *AuthApiRespData) GetRefreshToken() string

func (*AuthApiRespData) GetRefreshTokenExpires

func (x *AuthApiRespData) GetRefreshTokenExpires() int64

func (*AuthApiRespData) GetRequestID

func (x *AuthApiRespData) GetRequestID() string

func (*AuthApiRespData) GetTenantID

func (x *AuthApiRespData) GetTenantID() uint32

func (*AuthApiRespData) GetThisLogin

func (x *AuthApiRespData) GetThisLogin() int64

func (*AuthApiRespData) GetTrueName

func (x *AuthApiRespData) GetTrueName() string

func (*AuthApiRespData) ProtoMessage

func (*AuthApiRespData) ProtoMessage()

func (*AuthApiRespData) ProtoReflect

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

func (*AuthApiRespData) Reset

func (x *AuthApiRespData) Reset()

func (*AuthApiRespData) String

func (x *AuthApiRespData) String() string

type PingParams

type PingParams struct {
	Num int64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
	// contains filtered or unexported fields
}

func (*PingParams) Descriptor deprecated

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

Deprecated: Use PingParams.ProtoReflect.Descriptor instead.

func (*PingParams) GetNum

func (x *PingParams) GetNum() int64

func (*PingParams) ProtoMessage

func (*PingParams) ProtoMessage()

func (*PingParams) ProtoReflect

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

func (*PingParams) Reset

func (x *PingParams) Reset()

func (*PingParams) String

func (x *PingParams) String() string

type PingResp

type PingResp struct {
	Code int32         `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string        `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data *PingRespData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*PingResp) Descriptor deprecated

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

Deprecated: Use PingResp.ProtoReflect.Descriptor instead.

func (*PingResp) GetCode

func (x *PingResp) GetCode() int32

func (*PingResp) GetData

func (x *PingResp) GetData() *PingRespData

func (*PingResp) GetMsg

func (x *PingResp) GetMsg() string

func (*PingResp) ProtoMessage

func (*PingResp) ProtoMessage()

func (*PingResp) ProtoReflect

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

func (*PingResp) Reset

func (x *PingResp) Reset()

func (*PingResp) String

func (x *PingResp) String() string

type PingRespData

type PingRespData struct {
	RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"`
	Num       int64  `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
	// contains filtered or unexported fields
}

func (*PingRespData) Descriptor deprecated

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

Deprecated: Use PingRespData.ProtoReflect.Descriptor instead.

func (*PingRespData) GetNum

func (x *PingRespData) GetNum() int64

func (*PingRespData) GetRequestID

func (x *PingRespData) GetRequestID() string

func (*PingRespData) ProtoMessage

func (*PingRespData) ProtoMessage()

func (*PingRespData) ProtoReflect

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

func (*PingRespData) Reset

func (x *PingRespData) Reset()

func (*PingRespData) String

func (x *PingRespData) String() string

type RefreshTokenParams

type RefreshTokenParams struct {
	AccessKey string `protobuf:"bytes,1,opt,name=accessKey,proto3" json:"accessKey,omitempty"`
	Token     string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokenParams) Descriptor deprecated

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

Deprecated: Use RefreshTokenParams.ProtoReflect.Descriptor instead.

func (*RefreshTokenParams) GetAccessKey

func (x *RefreshTokenParams) GetAccessKey() string

func (*RefreshTokenParams) GetToken

func (x *RefreshTokenParams) GetToken() string

func (*RefreshTokenParams) ProtoMessage

func (*RefreshTokenParams) ProtoMessage()

func (*RefreshTokenParams) ProtoReflect

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

func (*RefreshTokenParams) Reset

func (x *RefreshTokenParams) Reset()

func (*RefreshTokenParams) String

func (x *RefreshTokenParams) String() string

type RefreshTokenResp

type RefreshTokenResp struct {
	Code int32                 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string                `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data *RefreshTokenRespData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokenResp) Descriptor deprecated

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

Deprecated: Use RefreshTokenResp.ProtoReflect.Descriptor instead.

func (*RefreshTokenResp) GetCode

func (x *RefreshTokenResp) GetCode() int32

func (*RefreshTokenResp) GetData

func (x *RefreshTokenResp) GetData() *RefreshTokenRespData

func (*RefreshTokenResp) GetMsg

func (x *RefreshTokenResp) GetMsg() string

func (*RefreshTokenResp) ProtoMessage

func (*RefreshTokenResp) ProtoMessage()

func (*RefreshTokenResp) ProtoReflect

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

func (*RefreshTokenResp) Reset

func (x *RefreshTokenResp) Reset()

func (*RefreshTokenResp) String

func (x *RefreshTokenResp) String() string

type RefreshTokenRespData

type RefreshTokenRespData struct {
	RequestID          string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"`
	AccessKey          string `protobuf:"bytes,2,opt,name=accessKey,proto3" json:"accessKey,omitempty"`
	AccessToken        string `protobuf:"bytes,3,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
	AccessTokenExpires int64  `protobuf:"varint,4,opt,name=accessTokenExpires,proto3" json:"accessTokenExpires,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokenRespData) Descriptor deprecated

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

Deprecated: Use RefreshTokenRespData.ProtoReflect.Descriptor instead.

func (*RefreshTokenRespData) GetAccessKey

func (x *RefreshTokenRespData) GetAccessKey() string

func (*RefreshTokenRespData) GetAccessToken

func (x *RefreshTokenRespData) GetAccessToken() string

func (*RefreshTokenRespData) GetAccessTokenExpires

func (x *RefreshTokenRespData) GetAccessTokenExpires() int64

func (*RefreshTokenRespData) GetRequestID

func (x *RefreshTokenRespData) GetRequestID() string

func (*RefreshTokenRespData) ProtoMessage

func (*RefreshTokenRespData) ProtoMessage()

func (*RefreshTokenRespData) ProtoReflect

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

func (*RefreshTokenRespData) Reset

func (x *RefreshTokenRespData) Reset()

func (*RefreshTokenRespData) String

func (x *RefreshTokenRespData) String() string

type ShieldRpcServiceClient added in v0.0.51

type ShieldRpcServiceClient interface {
	// note: ping服务 必要存在
	Ping(ctx context.Context, in *PingParams, opts ...grpc.CallOption) (*PingResp, error)
	// note: 通过API方式登录, 必要存在
	AuthLoginWithApi(ctx context.Context, in *AuthApiParams, opts ...grpc.CallOption) (*AuthApiResp, error)
	// note: 刷token, 必要存在
	RefreshToken(ctx context.Context, in *RefreshTokenParams, opts ...grpc.CallOption) (*RefreshTokenResp, error)
}

ShieldRpcServiceClient is the client API for ShieldRpcService 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 NewShieldRpcServiceClient added in v0.0.51

func NewShieldRpcServiceClient(cc grpc.ClientConnInterface) ShieldRpcServiceClient

type ShieldRpcServiceServer added in v0.0.51

type ShieldRpcServiceServer interface {
	// note: ping服务 必要存在
	Ping(context.Context, *PingParams) (*PingResp, error)
	// note: 通过API方式登录, 必要存在
	AuthLoginWithApi(context.Context, *AuthApiParams) (*AuthApiResp, error)
	// note: 刷token, 必要存在
	RefreshToken(context.Context, *RefreshTokenParams) (*RefreshTokenResp, error)
	// contains filtered or unexported methods
}

ShieldRpcServiceServer is the server API for ShieldRpcService service. All implementations must embed UnimplementedShieldRpcServiceServer for forward compatibility

type UnimplementedShieldRpcServiceServer added in v0.0.51

type UnimplementedShieldRpcServiceServer struct {
}

UnimplementedShieldRpcServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedShieldRpcServiceServer) AuthLoginWithApi added in v0.0.51

func (UnimplementedShieldRpcServiceServer) Ping added in v0.0.51

func (UnimplementedShieldRpcServiceServer) RefreshToken added in v0.0.51

type UnsafeShieldRpcServiceServer added in v0.0.51

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

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

Jump to

Keyboard shortcuts

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