pb

package
v0.0.0-...-2816995 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 7 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOAuthServiceServer

func RegisterOAuthServiceServer(s *grpc.Server, srv OAuthServiceServer)

func RegisterUserServiceServer

func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)

Types

type CheckTokenRequest

type CheckTokenRequest struct {
	Token                string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CheckTokenRequest) Descriptor

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

func (*CheckTokenRequest) GetToken

func (m *CheckTokenRequest) GetToken() string

func (*CheckTokenRequest) ProtoMessage

func (*CheckTokenRequest) ProtoMessage()

func (*CheckTokenRequest) Reset

func (m *CheckTokenRequest) Reset()

func (*CheckTokenRequest) String

func (m *CheckTokenRequest) String() string

func (*CheckTokenRequest) XXX_DiscardUnknown

func (m *CheckTokenRequest) XXX_DiscardUnknown()

func (*CheckTokenRequest) XXX_Marshal

func (m *CheckTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckTokenRequest) XXX_Merge

func (m *CheckTokenRequest) XXX_Merge(src proto.Message)

func (*CheckTokenRequest) XXX_Size

func (m *CheckTokenRequest) XXX_Size() int

func (*CheckTokenRequest) XXX_Unmarshal

func (m *CheckTokenRequest) XXX_Unmarshal(b []byte) error

type CheckTokenResponse

type CheckTokenResponse struct {
	UserDetails          *UserDetails   `protobuf:"bytes,1,opt,name=userDetails,proto3" json:"userDetails,omitempty"`
	ClientDetails        *ClientDetails `protobuf:"bytes,2,opt,name=clientDetails,proto3" json:"clientDetails,omitempty"`
	IsValidToken         bool           `protobuf:"varint,3,opt,name=isValidToken,proto3" json:"isValidToken,omitempty"`
	Err                  string         `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*CheckTokenResponse) Descriptor

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

func (*CheckTokenResponse) GetClientDetails

func (m *CheckTokenResponse) GetClientDetails() *ClientDetails

func (*CheckTokenResponse) GetErr

func (m *CheckTokenResponse) GetErr() string

func (*CheckTokenResponse) GetIsValidToken

func (m *CheckTokenResponse) GetIsValidToken() bool

func (*CheckTokenResponse) GetUserDetails

func (m *CheckTokenResponse) GetUserDetails() *UserDetails

func (*CheckTokenResponse) ProtoMessage

func (*CheckTokenResponse) ProtoMessage()

func (*CheckTokenResponse) Reset

func (m *CheckTokenResponse) Reset()

func (*CheckTokenResponse) String

func (m *CheckTokenResponse) String() string

func (*CheckTokenResponse) XXX_DiscardUnknown

func (m *CheckTokenResponse) XXX_DiscardUnknown()

func (*CheckTokenResponse) XXX_Marshal

func (m *CheckTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckTokenResponse) XXX_Merge

func (m *CheckTokenResponse) XXX_Merge(src proto.Message)

func (*CheckTokenResponse) XXX_Size

func (m *CheckTokenResponse) XXX_Size() int

func (*CheckTokenResponse) XXX_Unmarshal

func (m *CheckTokenResponse) XXX_Unmarshal(b []byte) error

type ClientDetails

type ClientDetails struct {
	ClientId                    string   `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
	AccessTokenValiditySeconds  int32    `protobuf:"varint,2,opt,name=accessTokenValiditySeconds,proto3" json:"accessTokenValiditySeconds,omitempty"`
	RefreshTokenValiditySeconds int32    `protobuf:"varint,3,opt,name=refreshTokenValiditySeconds,proto3" json:"refreshTokenValiditySeconds,omitempty"`
	AuthorizedGrantTypes        []string `protobuf:"bytes,4,rep,name=authorizedGrantTypes,proto3" json:"authorizedGrantTypes,omitempty"`
	XXX_NoUnkeyedLiteral        struct{} `json:"-"`
	XXX_unrecognized            []byte   `json:"-"`
	XXX_sizecache               int32    `json:"-"`
}

func (*ClientDetails) Descriptor

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

func (*ClientDetails) GetAccessTokenValiditySeconds

func (m *ClientDetails) GetAccessTokenValiditySeconds() int32

func (*ClientDetails) GetAuthorizedGrantTypes

func (m *ClientDetails) GetAuthorizedGrantTypes() []string

func (*ClientDetails) GetClientId

func (m *ClientDetails) GetClientId() string

func (*ClientDetails) GetRefreshTokenValiditySeconds

func (m *ClientDetails) GetRefreshTokenValiditySeconds() int32

func (*ClientDetails) ProtoMessage

func (*ClientDetails) ProtoMessage()

func (*ClientDetails) Reset

func (m *ClientDetails) Reset()

func (*ClientDetails) String

func (m *ClientDetails) String() string

func (*ClientDetails) XXX_DiscardUnknown

func (m *ClientDetails) XXX_DiscardUnknown()

func (*ClientDetails) XXX_Marshal

func (m *ClientDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientDetails) XXX_Merge

func (m *ClientDetails) XXX_Merge(src proto.Message)

func (*ClientDetails) XXX_Size

func (m *ClientDetails) XXX_Size() int

func (*ClientDetails) XXX_Unmarshal

func (m *ClientDetails) XXX_Unmarshal(b []byte) error

type OAuthServiceClient

type OAuthServiceClient interface {
	// token 校验
	CheckToken(ctx context.Context, in *CheckTokenRequest, opts ...grpc.CallOption) (*CheckTokenResponse, error)
}

OAuthServiceClient is the client API for OAuthService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewOAuthServiceClient

func NewOAuthServiceClient(cc *grpc.ClientConn) OAuthServiceClient

type OAuthServiceServer

type OAuthServiceServer interface {
	// token 校验
	CheckToken(context.Context, *CheckTokenRequest) (*CheckTokenResponse, error)
}

OAuthServiceServer is the server API for OAuthService service.

type SecRequest

type SecRequest struct {
	ProductId            int64    `protobuf:"varint,1,opt,name=ProductId,proto3" json:"ProductId,omitempty"`
	Source               string   `protobuf:"bytes,2,opt,name=Source,proto3" json:"Source,omitempty"`
	AuthCode             string   `protobuf:"bytes,3,opt,name=AuthCode,proto3" json:"AuthCode,omitempty"`
	SecTime              string   `protobuf:"bytes,4,opt,name=SecTime,proto3" json:"SecTime,omitempty"`
	Nance                string   `protobuf:"bytes,5,opt,name=Nance,proto3" json:"Nance,omitempty"`
	UserId               int64    `protobuf:"varint,6,opt,name=UserId,proto3" json:"UserId,omitempty"`
	UserAuthSign         string   `protobuf:"bytes,7,opt,name=UserAuthSign,proto3" json:"UserAuthSign,omitempty"`
	AccessTime           int64    `protobuf:"varint,8,opt,name=AccessTime,proto3" json:"AccessTime,omitempty"`
	ClientAddr           string   `protobuf:"bytes,9,opt,name=ClientAddr,proto3" json:"ClientAddr,omitempty"`
	ClientRefence        string   `protobuf:"bytes,10,opt,name=ClientRefence,proto3" json:"ClientRefence,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SecRequest) Descriptor

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

func (*SecRequest) GetAccessTime

func (m *SecRequest) GetAccessTime() int64

func (*SecRequest) GetAuthCode

func (m *SecRequest) GetAuthCode() string

func (*SecRequest) GetClientAddr

func (m *SecRequest) GetClientAddr() string

func (*SecRequest) GetClientRefence

func (m *SecRequest) GetClientRefence() string

func (*SecRequest) GetNance

func (m *SecRequest) GetNance() string

func (*SecRequest) GetProductId

func (m *SecRequest) GetProductId() int64

func (*SecRequest) GetSecTime

func (m *SecRequest) GetSecTime() string

func (*SecRequest) GetSource

func (m *SecRequest) GetSource() string

func (*SecRequest) GetUserAuthSign

func (m *SecRequest) GetUserAuthSign() string

func (*SecRequest) GetUserId

func (m *SecRequest) GetUserId() int64

func (*SecRequest) ProtoMessage

func (*SecRequest) ProtoMessage()

func (*SecRequest) Reset

func (m *SecRequest) Reset()

func (*SecRequest) String

func (m *SecRequest) String() string

func (*SecRequest) XXX_DiscardUnknown

func (m *SecRequest) XXX_DiscardUnknown()

func (*SecRequest) XXX_Marshal

func (m *SecRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SecRequest) XXX_Merge

func (m *SecRequest) XXX_Merge(src proto.Message)

func (*SecRequest) XXX_Size

func (m *SecRequest) XXX_Size() int

func (*SecRequest) XXX_Unmarshal

func (m *SecRequest) XXX_Unmarshal(b []byte) error

type SecResponse

type SecResponse struct {
	ProductId            int64    `protobuf:"varint,1,opt,name=ProductId,proto3" json:"ProductId,omitempty"`
	UserId               int64    `protobuf:"varint,2,opt,name=UserId,proto3" json:"UserId,omitempty"`
	Token                string   `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"`
	TokenTime            int64    `protobuf:"varint,4,opt,name=TokenTime,proto3" json:"TokenTime,omitempty"`
	Code                 int64    `protobuf:"varint,5,opt,name=Code,proto3" json:"Code,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SecResponse) Descriptor

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

func (*SecResponse) GetCode

func (m *SecResponse) GetCode() int64

func (*SecResponse) GetProductId

func (m *SecResponse) GetProductId() int64

func (*SecResponse) GetToken

func (m *SecResponse) GetToken() string

func (*SecResponse) GetTokenTime

func (m *SecResponse) GetTokenTime() int64

func (*SecResponse) GetUserId

func (m *SecResponse) GetUserId() int64

func (*SecResponse) ProtoMessage

func (*SecResponse) ProtoMessage()

func (*SecResponse) Reset

func (m *SecResponse) Reset()

func (*SecResponse) String

func (m *SecResponse) String() string

func (*SecResponse) XXX_DiscardUnknown

func (m *SecResponse) XXX_DiscardUnknown()

func (*SecResponse) XXX_Marshal

func (m *SecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SecResponse) XXX_Merge

func (m *SecResponse) XXX_Merge(src proto.Message)

func (*SecResponse) XXX_Size

func (m *SecResponse) XXX_Size() int

func (*SecResponse) XXX_Unmarshal

func (m *SecResponse) XXX_Unmarshal(b []byte) error

type UnimplementedOAuthServiceServer

type UnimplementedOAuthServiceServer struct {
}

UnimplementedOAuthServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedOAuthServiceServer) CheckToken

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserServiceServer) Check

type UserDetails

type UserDetails struct {
	UserId               int64    `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	Username             string   `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Authorities          []string `protobuf:"bytes,3,rep,name=authorities,proto3" json:"authorities,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserDetails) Descriptor

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

func (*UserDetails) GetAuthorities

func (m *UserDetails) GetAuthorities() []string

func (*UserDetails) GetUserId

func (m *UserDetails) GetUserId() int64

func (*UserDetails) GetUsername

func (m *UserDetails) GetUsername() string

func (*UserDetails) ProtoMessage

func (*UserDetails) ProtoMessage()

func (*UserDetails) Reset

func (m *UserDetails) Reset()

func (*UserDetails) String

func (m *UserDetails) String() string

func (*UserDetails) XXX_DiscardUnknown

func (m *UserDetails) XXX_DiscardUnknown()

func (*UserDetails) XXX_Marshal

func (m *UserDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserDetails) XXX_Merge

func (m *UserDetails) XXX_Merge(src proto.Message)

func (*UserDetails) XXX_Size

func (m *UserDetails) XXX_Size() int

func (*UserDetails) XXX_Unmarshal

func (m *UserDetails) XXX_Unmarshal(b []byte) error

type UserRequest

type UserRequest struct {
	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserRequest) Descriptor

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

func (*UserRequest) GetPassword

func (m *UserRequest) GetPassword() string

func (*UserRequest) GetUsername

func (m *UserRequest) GetUsername() string

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) Reset

func (m *UserRequest) Reset()

func (*UserRequest) String

func (m *UserRequest) String() string

func (*UserRequest) XXX_DiscardUnknown

func (m *UserRequest) XXX_DiscardUnknown()

func (*UserRequest) XXX_Marshal

func (m *UserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserRequest) XXX_Merge

func (m *UserRequest) XXX_Merge(src proto.Message)

func (*UserRequest) XXX_Size

func (m *UserRequest) XXX_Size() int

func (*UserRequest) XXX_Unmarshal

func (m *UserRequest) XXX_Unmarshal(b []byte) error

type UserResponse

type UserResponse struct {
	Result               bool     `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	UserId               int64    `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`
	Err                  string   `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserResponse) Descriptor

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

func (*UserResponse) GetErr

func (m *UserResponse) GetErr() string

func (*UserResponse) GetResult

func (m *UserResponse) GetResult() bool

func (*UserResponse) GetUserId

func (m *UserResponse) GetUserId() int64

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) Reset

func (m *UserResponse) Reset()

func (*UserResponse) String

func (m *UserResponse) String() string

func (*UserResponse) XXX_DiscardUnknown

func (m *UserResponse) XXX_DiscardUnknown()

func (*UserResponse) XXX_Marshal

func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserResponse) XXX_Merge

func (m *UserResponse) XXX_Merge(src proto.Message)

func (*UserResponse) XXX_Size

func (m *UserResponse) XXX_Size() int

func (*UserResponse) XXX_Unmarshal

func (m *UserResponse) XXX_Unmarshal(b []byte) error

type UserServiceClient

type UserServiceClient interface {
	Check(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error)
}

UserServiceClient is the client API for UserService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUserServiceClient

func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient

type UserServiceServer

type UserServiceServer interface {
	Check(context.Context, *UserRequest) (*UserResponse, error)
}

UserServiceServer is the server API for UserService service.

Jump to

Keyboard shortcuts

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