proto

package
v0.0.0-...-923a007 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NoError means there was no error during authentication
	NoError = 0
	// TokenNotValid ...
	TokenNotValid = 1
	// UserNotFound means that storage has no data about a user with given login
	UserNotFound = 2
	// InternalServerError returns on that storage has no data about a user with given login
	InternalServerError = 3
)

Variables

View Source
var AuthAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authservice.v2.AuthAPI",
	HandlerType: (*AuthAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CheckToken",
			Handler:    _AuthAPI_CheckToken_Handler,
		},
		{
			MethodName: "RefreshTokens",
			Handler:    _AuthAPI_RefreshTokens_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/auth-v2.proto",
}

AuthAPI_ServiceDesc is the grpc.ServiceDesc for AuthAPI 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_proto_auth_v2_proto protoreflect.FileDescriptor

Functions

func Error

func Error(i int) string

Error is a wrapper for

func RegisterAuthAPIServer

func RegisterAuthAPIServer(s grpc.ServiceRegistrar, srv AuthAPIServer)

Types

type AuthAPIClient

type AuthAPIClient interface {
	CheckToken(ctx context.Context, in *CheckTokenRequest, opts ...grpc.CallOption) (*CheckTokenResponse, error)
	RefreshTokens(ctx context.Context, in *RefreshTokensRequest, opts ...grpc.CallOption) (*RefreshTokensResponse, error)
}

AuthAPIClient is the client API for AuthAPI 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 NewAuthAPIClient

func NewAuthAPIClient(cc grpc.ClientConnInterface) AuthAPIClient

type AuthAPIServer

type AuthAPIServer interface {
	CheckToken(context.Context, *CheckTokenRequest) (*CheckTokenResponse, error)
	RefreshTokens(context.Context, *RefreshTokensRequest) (*RefreshTokensResponse, error)
	// contains filtered or unexported methods
}

AuthAPIServer is the server API for AuthAPI service. All implementations must embed UnimplementedAuthAPIServer for forward compatibility

type CheckTokenRequest

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

func (*CheckTokenRequest) Descriptor deprecated

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

Deprecated: Use CheckTokenRequest.ProtoReflect.Descriptor instead.

func (*CheckTokenRequest) GetToken

func (x *CheckTokenRequest) GetToken() string

func (*CheckTokenRequest) ProtoMessage

func (*CheckTokenRequest) ProtoMessage()

func (*CheckTokenRequest) ProtoReflect

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

func (*CheckTokenRequest) Reset

func (x *CheckTokenRequest) Reset()

func (*CheckTokenRequest) String

func (x *CheckTokenRequest) String() string

type CheckTokenResponse

type CheckTokenResponse struct {
	Login string `protobuf:"bytes,1,opt,name=Login,proto3" json:"Login,omitempty"`
	Error uint32 `protobuf:"varint,2,opt,name=Error,proto3" json:"Error,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckTokenResponse) Descriptor deprecated

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

Deprecated: Use CheckTokenResponse.ProtoReflect.Descriptor instead.

func (*CheckTokenResponse) GetError

func (x *CheckTokenResponse) GetError() uint32

func (*CheckTokenResponse) GetLogin

func (x *CheckTokenResponse) GetLogin() string

func (*CheckTokenResponse) ProtoMessage

func (*CheckTokenResponse) ProtoMessage()

func (*CheckTokenResponse) ProtoReflect

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

func (*CheckTokenResponse) Reset

func (x *CheckTokenResponse) Reset()

func (*CheckTokenResponse) String

func (x *CheckTokenResponse) String() string

type RefreshTokensRequest

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

func (*RefreshTokensRequest) Descriptor deprecated

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

Deprecated: Use RefreshTokensRequest.ProtoReflect.Descriptor instead.

func (*RefreshTokensRequest) GetToken

func (x *RefreshTokensRequest) GetToken() string

func (*RefreshTokensRequest) ProtoMessage

func (*RefreshTokensRequest) ProtoMessage()

func (*RefreshTokensRequest) ProtoReflect

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

func (*RefreshTokensRequest) Reset

func (x *RefreshTokensRequest) Reset()

func (*RefreshTokensRequest) String

func (x *RefreshTokensRequest) String() string

type RefreshTokensResponse

type RefreshTokensResponse struct {
	AccessToken  string `protobuf:"bytes,1,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"`
	RefreshToken string `protobuf:"bytes,2,opt,name=RefreshToken,proto3" json:"RefreshToken,omitempty"`
	Error        uint32 `protobuf:"varint,3,opt,name=Error,proto3" json:"Error,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokensResponse) Descriptor deprecated

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

Deprecated: Use RefreshTokensResponse.ProtoReflect.Descriptor instead.

func (*RefreshTokensResponse) GetAccessToken

func (x *RefreshTokensResponse) GetAccessToken() string

func (*RefreshTokensResponse) GetError

func (x *RefreshTokensResponse) GetError() uint32

func (*RefreshTokensResponse) GetRefreshToken

func (x *RefreshTokensResponse) GetRefreshToken() string

func (*RefreshTokensResponse) ProtoMessage

func (*RefreshTokensResponse) ProtoMessage()

func (*RefreshTokensResponse) ProtoReflect

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

func (*RefreshTokensResponse) Reset

func (x *RefreshTokensResponse) Reset()

func (*RefreshTokensResponse) String

func (x *RefreshTokensResponse) String() string

type UnimplementedAuthAPIServer

type UnimplementedAuthAPIServer struct {
}

UnimplementedAuthAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthAPIServer) CheckToken

func (UnimplementedAuthAPIServer) RefreshTokens

type UnsafeAuthAPIServer

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

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

Jump to

Keyboard shortcuts

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