Documentation ¶
Index ¶
- Variables
- func RegisterOAuthServer(s grpc.ServiceRegistrar, srv OAuthServer)
- type AuthRequest
- func (*AuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthRequest) GetDomainUrl() string
- func (x *AuthRequest) GetGrantType() string
- func (x *AuthRequest) GetLogin() string
- func (x *AuthRequest) GetPassword() string
- func (x *AuthRequest) GetRefreshToken() string
- func (*AuthRequest) ProtoMessage()
- func (x *AuthRequest) ProtoReflect() protoreflect.Message
- func (x *AuthRequest) Reset()
- func (x *AuthRequest) String() string
- type AuthResponse
- func (*AuthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthResponse) GetAccessToken() string
- func (x *AuthResponse) GetExpiresAccessAt() int64
- func (x *AuthResponse) GetExpiresRefreshAt() int64
- func (x *AuthResponse) GetRefreshToken() string
- func (x *AuthResponse) GetTokenType() string
- func (x *AuthResponse) GetUserEmail() string
- func (x *AuthResponse) GetUserId() string
- func (x *AuthResponse) GetUserLogin() string
- func (x *AuthResponse) GetUserPhone() string
- func (*AuthResponse) ProtoMessage()
- func (x *AuthResponse) ProtoReflect() protoreflect.Message
- func (x *AuthResponse) Reset()
- func (x *AuthResponse) String() string
- type OAuthClient
- type OAuthServer
- type UnimplementedOAuthServer
- type UnsafeOAuthServer
Constants ¶
This section is empty.
Variables ¶
var OAuth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.OAuth", HandlerType: (*OAuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Auth", Handler: _OAuth_Auth_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/authorize/authorize.proto", }
OAuth_ServiceDesc is the grpc.ServiceDesc for OAuth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOAuthServer ¶
func RegisterOAuthServer(s grpc.ServiceRegistrar, srv OAuthServer)
Types ¶
type AuthRequest ¶
type AuthRequest struct { GrantType string `protobuf:"bytes,1,opt,name=grantType,proto3" json:"grantType,omitempty"` Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` DomainUrl string `protobuf:"bytes,4,opt,name=domainUrl,proto3" json:"domainUrl,omitempty"` RefreshToken string `protobuf:"bytes,5,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` // contains filtered or unexported fields }
func (*AuthRequest) Descriptor
deprecated
func (*AuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.
func (*AuthRequest) GetDomainUrl ¶
func (x *AuthRequest) GetDomainUrl() string
func (*AuthRequest) GetGrantType ¶
func (x *AuthRequest) GetGrantType() string
func (*AuthRequest) GetLogin ¶
func (x *AuthRequest) GetLogin() string
func (*AuthRequest) GetPassword ¶
func (x *AuthRequest) GetPassword() string
func (*AuthRequest) GetRefreshToken ¶
func (x *AuthRequest) GetRefreshToken() string
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 { TokenType string `protobuf:"bytes,1,opt,name=tokenType,proto3" json:"tokenType,omitempty"` AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` ExpiresAccessAt int64 `protobuf:"varint,4,opt,name=expiresAccessAt,proto3" json:"expiresAccessAt,omitempty"` ExpiresRefreshAt int64 `protobuf:"varint,5,opt,name=expiresRefreshAt,proto3" json:"expiresRefreshAt,omitempty"` UserId string `protobuf:"bytes,6,opt,name=userId,proto3" json:"userId,omitempty"` UserEmail string `protobuf:"bytes,7,opt,name=userEmail,proto3" json:"userEmail,omitempty"` UserPhone string `protobuf:"bytes,8,opt,name=userPhone,proto3" json:"userPhone,omitempty"` UserLogin string `protobuf:"bytes,9,opt,name=userLogin,proto3" json:"userLogin,omitempty"` // contains filtered or unexported fields }
func (*AuthResponse) Descriptor
deprecated
func (*AuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.
func (*AuthResponse) GetAccessToken ¶
func (x *AuthResponse) GetAccessToken() string
func (*AuthResponse) GetExpiresAccessAt ¶
func (x *AuthResponse) GetExpiresAccessAt() int64
func (*AuthResponse) GetExpiresRefreshAt ¶
func (x *AuthResponse) GetExpiresRefreshAt() int64
func (*AuthResponse) GetRefreshToken ¶
func (x *AuthResponse) GetRefreshToken() string
func (*AuthResponse) GetTokenType ¶
func (x *AuthResponse) GetTokenType() string
func (*AuthResponse) GetUserEmail ¶
func (x *AuthResponse) GetUserEmail() string
func (*AuthResponse) GetUserId ¶
func (x *AuthResponse) GetUserId() string
func (*AuthResponse) GetUserLogin ¶
func (x *AuthResponse) GetUserLogin() string
func (*AuthResponse) GetUserPhone ¶
func (x *AuthResponse) GetUserPhone() 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 OAuthClient ¶
type OAuthClient interface {
Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, error)
}
OAuthClient is the client API for OAuth 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 NewOAuthClient ¶
func NewOAuthClient(cc grpc.ClientConnInterface) OAuthClient
type OAuthServer ¶
type OAuthServer interface { Auth(context.Context, *AuthRequest) (*AuthResponse, error) // contains filtered or unexported methods }
OAuthServer is the server API for OAuth service. All implementations must embed UnimplementedOAuthServer for forward compatibility
type UnimplementedOAuthServer ¶
type UnimplementedOAuthServer struct { }
UnimplementedOAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedOAuthServer) Auth ¶
func (UnimplementedOAuthServer) Auth(context.Context, *AuthRequest) (*AuthResponse, error)
type UnsafeOAuthServer ¶
type UnsafeOAuthServer interface {
// contains filtered or unexported methods
}
UnsafeOAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OAuthServer will result in compilation errors.