proto

package
v0.0.0-...-d43696c Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_token_proto protoreflect.FileDescriptor
View Source
var Token_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Token",
	HandlerType: (*TokenServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateToken",
			Handler:    _Token_GenerateToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "token.proto",
}

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

Functions

func RegisterTokenServer

func RegisterTokenServer(s grpc.ServiceRegistrar, srv TokenServer)

Types

type GenerateTokenRequest

type GenerateTokenRequest struct {
	UserID uint64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateTokenRequest) Descriptor deprecated

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

Deprecated: Use GenerateTokenRequest.ProtoReflect.Descriptor instead.

func (*GenerateTokenRequest) GetUserID

func (x *GenerateTokenRequest) GetUserID() uint64

func (*GenerateTokenRequest) ProtoMessage

func (*GenerateTokenRequest) ProtoMessage()

func (*GenerateTokenRequest) ProtoReflect

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

func (*GenerateTokenRequest) Reset

func (x *GenerateTokenRequest) Reset()

func (*GenerateTokenRequest) String

func (x *GenerateTokenRequest) String() string

func (*GenerateTokenRequest) Validate

func (m *GenerateTokenRequest) Validate() error

Validate checks the field values on GenerateTokenRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GenerateTokenRequest) ValidateAll

func (m *GenerateTokenRequest) ValidateAll() error

ValidateAll checks the field values on GenerateTokenRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GenerateTokenRequestMultiError, or nil if none found.

type GenerateTokenRequestMultiError

type GenerateTokenRequestMultiError []error

GenerateTokenRequestMultiError is an error wrapping multiple validation errors returned by GenerateTokenRequest.ValidateAll() if the designated constraints aren't met.

func (GenerateTokenRequestMultiError) AllErrors

func (m GenerateTokenRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GenerateTokenRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GenerateTokenRequestValidationError

type GenerateTokenRequestValidationError struct {
	// contains filtered or unexported fields
}

GenerateTokenRequestValidationError is the validation error returned by GenerateTokenRequest.Validate if the designated constraints aren't met.

func (GenerateTokenRequestValidationError) Cause

Cause function returns cause value.

func (GenerateTokenRequestValidationError) Error

Error satisfies the builtin error interface

func (GenerateTokenRequestValidationError) ErrorName

ErrorName returns error name.

func (GenerateTokenRequestValidationError) Field

Field function returns field value.

func (GenerateTokenRequestValidationError) Key

Key function returns key value.

func (GenerateTokenRequestValidationError) Reason

Reason function returns reason value.

type TokenClient

type TokenClient interface {
	GenerateToken(ctx context.Context, in *GenerateTokenRequest, opts ...grpc.CallOption) (*TokenResponse, error)
}

TokenClient is the client API for Token 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 NewTokenClient

func NewTokenClient(cc grpc.ClientConnInterface) TokenClient

type TokenResponse

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

func (*TokenResponse) Descriptor deprecated

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

Deprecated: Use TokenResponse.ProtoReflect.Descriptor instead.

func (*TokenResponse) GetToken

func (x *TokenResponse) GetToken() string

func (*TokenResponse) ProtoMessage

func (*TokenResponse) ProtoMessage()

func (*TokenResponse) ProtoReflect

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

func (*TokenResponse) Reset

func (x *TokenResponse) Reset()

func (*TokenResponse) String

func (x *TokenResponse) String() string

func (*TokenResponse) Validate

func (m *TokenResponse) Validate() error

Validate checks the field values on TokenResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*TokenResponse) ValidateAll

func (m *TokenResponse) ValidateAll() error

ValidateAll checks the field values on TokenResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TokenResponseMultiError, or nil if none found.

type TokenResponseMultiError

type TokenResponseMultiError []error

TokenResponseMultiError is an error wrapping multiple validation errors returned by TokenResponse.ValidateAll() if the designated constraints aren't met.

func (TokenResponseMultiError) AllErrors

func (m TokenResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TokenResponseMultiError) Error

func (m TokenResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type TokenResponseValidationError

type TokenResponseValidationError struct {
	// contains filtered or unexported fields
}

TokenResponseValidationError is the validation error returned by TokenResponse.Validate if the designated constraints aren't met.

func (TokenResponseValidationError) Cause

Cause function returns cause value.

func (TokenResponseValidationError) Error

Error satisfies the builtin error interface

func (TokenResponseValidationError) ErrorName

func (e TokenResponseValidationError) ErrorName() string

ErrorName returns error name.

func (TokenResponseValidationError) Field

Field function returns field value.

func (TokenResponseValidationError) Key

Key function returns key value.

func (TokenResponseValidationError) Reason

Reason function returns reason value.

type TokenServer

type TokenServer interface {
	GenerateToken(context.Context, *GenerateTokenRequest) (*TokenResponse, error)
	// contains filtered or unexported methods
}

TokenServer is the server API for Token service. All implementations must embed UnimplementedTokenServer for forward compatibility

type UnimplementedTokenServer

type UnimplementedTokenServer struct {
}

UnimplementedTokenServer must be embedded to have forward compatible implementations.

func (UnimplementedTokenServer) GenerateToken

type UnsafeTokenServer

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

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

Jump to

Keyboard shortcuts

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