v1

package
v0.0.0-...-4c0fd1a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "USER_NOT_FOUND",
		1: "USER_ALREADY_EXISTS",
		2: "WRONG_PASSWORD",
		3: "INVALID_TOKEN",
	}
	ErrorReason_value = map[string]int32{
		"USER_NOT_FOUND":      0,
		"USER_ALREADY_EXISTS": 1,
		"WRONG_PASSWORD":      2,
		"INVALID_TOKEN":       3,
	}
)

Enum value maps for ErrorReason.

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.auth.v1.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignUp",
			Handler:    _Auth_SignUp_Handler,
		},
		{
			MethodName: "SignIn",
			Handler:    _Auth_SignIn_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _Auth_RefreshToken_Handler,
		},
		{
			MethodName: "Identity",
			Handler:    _Auth_Identity_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth/v1/auth.proto",
}

Auth_ServiceDesc is the grpc.ServiceDesc for Auth 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_auth_v1_auth_proto protoreflect.FileDescriptor
View Source
var File_auth_v1_error_reason_proto protoreflect.FileDescriptor

Functions

func RegisterAuthHandler

func RegisterAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthHandler registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthHandlerClient

func RegisterAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthClient) error

RegisterAuthHandlerClient registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthClient" to call the correct interceptors.

func RegisterAuthHandlerFromEndpoint

func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthHandlerServer

func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServer) error

RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". UnaryRPC :call AuthServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthHandlerFromEndpoint instead.

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

Types

type AuthClient

type AuthClient interface {
	SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpReply, error)
	SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInReply, error)
	RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenReply, error)
	Identity(ctx context.Context, in *IdentityRequest, opts ...grpc.CallOption) (*IdentityReply, error)
}

AuthClient is the client API for Auth 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 NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	SignUp(context.Context, *SignUpRequest) (*SignUpReply, error)
	SignIn(context.Context, *SignInRequest) (*SignInReply, error)
	RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenReply, error)
	Identity(context.Context, *IdentityRequest) (*IdentityReply, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_USER_NOT_FOUND      ErrorReason = 0
	ErrorReason_USER_ALREADY_EXISTS ErrorReason = 1
	ErrorReason_WRONG_PASSWORD      ErrorReason = 2
	ErrorReason_INVALID_TOKEN       ErrorReason = 3
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

func (ErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type IdentityReply

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

func (*IdentityReply) Descriptor deprecated

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

Deprecated: Use IdentityReply.ProtoReflect.Descriptor instead.

func (*IdentityReply) GetId

func (x *IdentityReply) GetId() int64

func (*IdentityReply) ProtoMessage

func (*IdentityReply) ProtoMessage()

func (*IdentityReply) ProtoReflect

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

func (*IdentityReply) Reset

func (x *IdentityReply) Reset()

func (*IdentityReply) String

func (x *IdentityReply) String() string

func (*IdentityReply) Validate

func (m *IdentityReply) Validate() error

Validate checks the field values on IdentityReply 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 (*IdentityReply) ValidateAll

func (m *IdentityReply) ValidateAll() error

ValidateAll checks the field values on IdentityReply 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 IdentityReplyMultiError, or nil if none found.

type IdentityReplyMultiError

type IdentityReplyMultiError []error

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

func (IdentityReplyMultiError) AllErrors

func (m IdentityReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (IdentityReplyMultiError) Error

func (m IdentityReplyMultiError) Error() string

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

type IdentityReplyValidationError

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

IdentityReplyValidationError is the validation error returned by IdentityReply.Validate if the designated constraints aren't met.

func (IdentityReplyValidationError) Cause

Cause function returns cause value.

func (IdentityReplyValidationError) Error

Error satisfies the builtin error interface

func (IdentityReplyValidationError) ErrorName

func (e IdentityReplyValidationError) ErrorName() string

ErrorName returns error name.

func (IdentityReplyValidationError) Field

Field function returns field value.

func (IdentityReplyValidationError) Key

Key function returns key value.

func (IdentityReplyValidationError) Reason

Reason function returns reason value.

type IdentityRequest

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

func (*IdentityRequest) Descriptor deprecated

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

Deprecated: Use IdentityRequest.ProtoReflect.Descriptor instead.

func (*IdentityRequest) GetAccessToken

func (x *IdentityRequest) GetAccessToken() string

func (*IdentityRequest) ProtoMessage

func (*IdentityRequest) ProtoMessage()

func (*IdentityRequest) ProtoReflect

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

func (*IdentityRequest) Reset

func (x *IdentityRequest) Reset()

func (*IdentityRequest) String

func (x *IdentityRequest) String() string

func (*IdentityRequest) Validate

func (m *IdentityRequest) Validate() error

Validate checks the field values on IdentityRequest 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 (*IdentityRequest) ValidateAll

func (m *IdentityRequest) ValidateAll() error

ValidateAll checks the field values on IdentityRequest 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 IdentityRequestMultiError, or nil if none found.

type IdentityRequestMultiError

type IdentityRequestMultiError []error

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

func (IdentityRequestMultiError) AllErrors

func (m IdentityRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (IdentityRequestMultiError) Error

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

type IdentityRequestValidationError

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

IdentityRequestValidationError is the validation error returned by IdentityRequest.Validate if the designated constraints aren't met.

func (IdentityRequestValidationError) Cause

Cause function returns cause value.

func (IdentityRequestValidationError) Error

Error satisfies the builtin error interface

func (IdentityRequestValidationError) ErrorName

func (e IdentityRequestValidationError) ErrorName() string

ErrorName returns error name.

func (IdentityRequestValidationError) Field

Field function returns field value.

func (IdentityRequestValidationError) Key

Key function returns key value.

func (IdentityRequestValidationError) Reason

Reason function returns reason value.

type RefreshTokenReply

type RefreshTokenReply struct {
	Tokens *Tokens `protobuf:"bytes,1,opt,name=tokens,proto3" json:"tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokenReply) Descriptor deprecated

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

Deprecated: Use RefreshTokenReply.ProtoReflect.Descriptor instead.

func (*RefreshTokenReply) GetTokens

func (x *RefreshTokenReply) GetTokens() *Tokens

func (*RefreshTokenReply) ProtoMessage

func (*RefreshTokenReply) ProtoMessage()

func (*RefreshTokenReply) ProtoReflect

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

func (*RefreshTokenReply) Reset

func (x *RefreshTokenReply) Reset()

func (*RefreshTokenReply) String

func (x *RefreshTokenReply) String() string

func (*RefreshTokenReply) Validate

func (m *RefreshTokenReply) Validate() error

Validate checks the field values on RefreshTokenReply 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 (*RefreshTokenReply) ValidateAll

func (m *RefreshTokenReply) ValidateAll() error

ValidateAll checks the field values on RefreshTokenReply 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 RefreshTokenReplyMultiError, or nil if none found.

type RefreshTokenReplyMultiError

type RefreshTokenReplyMultiError []error

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

func (RefreshTokenReplyMultiError) AllErrors

func (m RefreshTokenReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RefreshTokenReplyMultiError) Error

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

type RefreshTokenReplyValidationError

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

RefreshTokenReplyValidationError is the validation error returned by RefreshTokenReply.Validate if the designated constraints aren't met.

func (RefreshTokenReplyValidationError) Cause

Cause function returns cause value.

func (RefreshTokenReplyValidationError) Error

Error satisfies the builtin error interface

func (RefreshTokenReplyValidationError) ErrorName

ErrorName returns error name.

func (RefreshTokenReplyValidationError) Field

Field function returns field value.

func (RefreshTokenReplyValidationError) Key

Key function returns key value.

func (RefreshTokenReplyValidationError) Reason

Reason function returns reason value.

type RefreshTokenRequest

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

func (*RefreshTokenRequest) Descriptor deprecated

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

Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.

func (*RefreshTokenRequest) GetRefreshToken

func (x *RefreshTokenRequest) GetRefreshToken() string

func (*RefreshTokenRequest) ProtoMessage

func (*RefreshTokenRequest) ProtoMessage()

func (*RefreshTokenRequest) ProtoReflect

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

func (*RefreshTokenRequest) Reset

func (x *RefreshTokenRequest) Reset()

func (*RefreshTokenRequest) String

func (x *RefreshTokenRequest) String() string

func (*RefreshTokenRequest) Validate

func (m *RefreshTokenRequest) Validate() error

Validate checks the field values on RefreshTokenRequest 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 (*RefreshTokenRequest) ValidateAll

func (m *RefreshTokenRequest) ValidateAll() error

ValidateAll checks the field values on RefreshTokenRequest 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 RefreshTokenRequestMultiError, or nil if none found.

type RefreshTokenRequestMultiError

type RefreshTokenRequestMultiError []error

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

func (RefreshTokenRequestMultiError) AllErrors

func (m RefreshTokenRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RefreshTokenRequestMultiError) Error

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

type RefreshTokenRequestValidationError

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

RefreshTokenRequestValidationError is the validation error returned by RefreshTokenRequest.Validate if the designated constraints aren't met.

func (RefreshTokenRequestValidationError) Cause

Cause function returns cause value.

func (RefreshTokenRequestValidationError) Error

Error satisfies the builtin error interface

func (RefreshTokenRequestValidationError) ErrorName

ErrorName returns error name.

func (RefreshTokenRequestValidationError) Field

Field function returns field value.

func (RefreshTokenRequestValidationError) Key

Key function returns key value.

func (RefreshTokenRequestValidationError) Reason

Reason function returns reason value.

type SignInReply

type SignInReply struct {
	Id     int64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name   string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email  string  `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Tokens *Tokens `protobuf:"bytes,4,opt,name=tokens,proto3" json:"tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*SignInReply) Descriptor deprecated

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

Deprecated: Use SignInReply.ProtoReflect.Descriptor instead.

func (*SignInReply) GetEmail

func (x *SignInReply) GetEmail() string

func (*SignInReply) GetId

func (x *SignInReply) GetId() int64

func (*SignInReply) GetName

func (x *SignInReply) GetName() string

func (*SignInReply) GetTokens

func (x *SignInReply) GetTokens() *Tokens

func (*SignInReply) ProtoMessage

func (*SignInReply) ProtoMessage()

func (*SignInReply) ProtoReflect

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

func (*SignInReply) Reset

func (x *SignInReply) Reset()

func (*SignInReply) String

func (x *SignInReply) String() string

func (*SignInReply) Validate

func (m *SignInReply) Validate() error

Validate checks the field values on SignInReply 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 (*SignInReply) ValidateAll

func (m *SignInReply) ValidateAll() error

ValidateAll checks the field values on SignInReply 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 SignInReplyMultiError, or nil if none found.

type SignInReplyMultiError

type SignInReplyMultiError []error

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

func (SignInReplyMultiError) AllErrors

func (m SignInReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SignInReplyMultiError) Error

func (m SignInReplyMultiError) Error() string

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

type SignInReplyValidationError

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

SignInReplyValidationError is the validation error returned by SignInReply.Validate if the designated constraints aren't met.

func (SignInReplyValidationError) Cause

Cause function returns cause value.

func (SignInReplyValidationError) Error

Error satisfies the builtin error interface

func (SignInReplyValidationError) ErrorName

func (e SignInReplyValidationError) ErrorName() string

ErrorName returns error name.

func (SignInReplyValidationError) Field

Field function returns field value.

func (SignInReplyValidationError) Key

Key function returns key value.

func (SignInReplyValidationError) Reason

Reason function returns reason value.

type SignInRequest

type SignInRequest struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SignInRequest) Descriptor deprecated

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

Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.

func (*SignInRequest) GetEmail

func (x *SignInRequest) GetEmail() string

func (*SignInRequest) GetPassword

func (x *SignInRequest) GetPassword() string

func (*SignInRequest) ProtoMessage

func (*SignInRequest) ProtoMessage()

func (*SignInRequest) ProtoReflect

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

func (*SignInRequest) Reset

func (x *SignInRequest) Reset()

func (*SignInRequest) String

func (x *SignInRequest) String() string

func (*SignInRequest) Validate

func (m *SignInRequest) Validate() error

Validate checks the field values on SignInRequest 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 (*SignInRequest) ValidateAll

func (m *SignInRequest) ValidateAll() error

ValidateAll checks the field values on SignInRequest 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 SignInRequestMultiError, or nil if none found.

type SignInRequestMultiError

type SignInRequestMultiError []error

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

func (SignInRequestMultiError) AllErrors

func (m SignInRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SignInRequestMultiError) Error

func (m SignInRequestMultiError) Error() string

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

type SignInRequestValidationError

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

SignInRequestValidationError is the validation error returned by SignInRequest.Validate if the designated constraints aren't met.

func (SignInRequestValidationError) Cause

Cause function returns cause value.

func (SignInRequestValidationError) Error

Error satisfies the builtin error interface

func (SignInRequestValidationError) ErrorName

func (e SignInRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SignInRequestValidationError) Field

Field function returns field value.

func (SignInRequestValidationError) Key

Key function returns key value.

func (SignInRequestValidationError) Reason

Reason function returns reason value.

type SignUpReply

type SignUpReply struct {
	Id     int64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name   string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Email  string  `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Tokens *Tokens `protobuf:"bytes,4,opt,name=tokens,proto3" json:"tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*SignUpReply) Descriptor deprecated

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

Deprecated: Use SignUpReply.ProtoReflect.Descriptor instead.

func (*SignUpReply) GetEmail

func (x *SignUpReply) GetEmail() string

func (*SignUpReply) GetId

func (x *SignUpReply) GetId() int64

func (*SignUpReply) GetName

func (x *SignUpReply) GetName() string

func (*SignUpReply) GetTokens

func (x *SignUpReply) GetTokens() *Tokens

func (*SignUpReply) ProtoMessage

func (*SignUpReply) ProtoMessage()

func (*SignUpReply) ProtoReflect

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

func (*SignUpReply) Reset

func (x *SignUpReply) Reset()

func (*SignUpReply) String

func (x *SignUpReply) String() string

func (*SignUpReply) Validate

func (m *SignUpReply) Validate() error

Validate checks the field values on SignUpReply 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 (*SignUpReply) ValidateAll

func (m *SignUpReply) ValidateAll() error

ValidateAll checks the field values on SignUpReply 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 SignUpReplyMultiError, or nil if none found.

type SignUpReplyMultiError

type SignUpReplyMultiError []error

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

func (SignUpReplyMultiError) AllErrors

func (m SignUpReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SignUpReplyMultiError) Error

func (m SignUpReplyMultiError) Error() string

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

type SignUpReplyValidationError

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

SignUpReplyValidationError is the validation error returned by SignUpReply.Validate if the designated constraints aren't met.

func (SignUpReplyValidationError) Cause

Cause function returns cause value.

func (SignUpReplyValidationError) Error

Error satisfies the builtin error interface

func (SignUpReplyValidationError) ErrorName

func (e SignUpReplyValidationError) ErrorName() string

ErrorName returns error name.

func (SignUpReplyValidationError) Field

Field function returns field value.

func (SignUpReplyValidationError) Key

Key function returns key value.

func (SignUpReplyValidationError) Reason

Reason function returns reason value.

type SignUpRequest

type SignUpRequest struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Email    string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SignUpRequest) Descriptor deprecated

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

Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.

func (*SignUpRequest) GetEmail

func (x *SignUpRequest) GetEmail() string

func (*SignUpRequest) GetName

func (x *SignUpRequest) GetName() string

func (*SignUpRequest) GetPassword

func (x *SignUpRequest) GetPassword() string

func (*SignUpRequest) ProtoMessage

func (*SignUpRequest) ProtoMessage()

func (*SignUpRequest) ProtoReflect

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

func (*SignUpRequest) Reset

func (x *SignUpRequest) Reset()

func (*SignUpRequest) String

func (x *SignUpRequest) String() string

func (*SignUpRequest) Validate

func (m *SignUpRequest) Validate() error

Validate checks the field values on SignUpRequest 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 (*SignUpRequest) ValidateAll

func (m *SignUpRequest) ValidateAll() error

ValidateAll checks the field values on SignUpRequest 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 SignUpRequestMultiError, or nil if none found.

type SignUpRequestMultiError

type SignUpRequestMultiError []error

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

func (SignUpRequestMultiError) AllErrors

func (m SignUpRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SignUpRequestMultiError) Error

func (m SignUpRequestMultiError) Error() string

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

type SignUpRequestValidationError

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

SignUpRequestValidationError is the validation error returned by SignUpRequest.Validate if the designated constraints aren't met.

func (SignUpRequestValidationError) Cause

Cause function returns cause value.

func (SignUpRequestValidationError) Error

Error satisfies the builtin error interface

func (SignUpRequestValidationError) ErrorName

func (e SignUpRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SignUpRequestValidationError) Field

Field function returns field value.

func (SignUpRequestValidationError) Key

Key function returns key value.

func (SignUpRequestValidationError) Reason

Reason function returns reason value.

type Tokens

type Tokens struct {
	AccessToken  string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*Tokens) Descriptor deprecated

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

Deprecated: Use Tokens.ProtoReflect.Descriptor instead.

func (*Tokens) GetAccessToken

func (x *Tokens) GetAccessToken() string

func (*Tokens) GetRefreshToken

func (x *Tokens) GetRefreshToken() string

func (*Tokens) ProtoMessage

func (*Tokens) ProtoMessage()

func (*Tokens) ProtoReflect

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

func (*Tokens) Reset

func (x *Tokens) Reset()

func (*Tokens) String

func (x *Tokens) String() string

func (*Tokens) Validate

func (m *Tokens) Validate() error

Validate checks the field values on Tokens 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 (*Tokens) ValidateAll

func (m *Tokens) ValidateAll() error

ValidateAll checks the field values on Tokens 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 TokensMultiError, or nil if none found.

type TokensMultiError

type TokensMultiError []error

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

func (TokensMultiError) AllErrors

func (m TokensMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TokensMultiError) Error

func (m TokensMultiError) Error() string

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

type TokensValidationError

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

TokensValidationError is the validation error returned by Tokens.Validate if the designated constraints aren't met.

func (TokensValidationError) Cause

func (e TokensValidationError) Cause() error

Cause function returns cause value.

func (TokensValidationError) Error

func (e TokensValidationError) Error() string

Error satisfies the builtin error interface

func (TokensValidationError) ErrorName

func (e TokensValidationError) ErrorName() string

ErrorName returns error name.

func (TokensValidationError) Field

func (e TokensValidationError) Field() string

Field function returns field value.

func (TokensValidationError) Key

func (e TokensValidationError) Key() bool

Key function returns key value.

func (TokensValidationError) Reason

func (e TokensValidationError) Reason() string

Reason function returns reason value.

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) Identity

func (UnimplementedAuthServer) RefreshToken

func (UnimplementedAuthServer) SignIn

func (UnimplementedAuthServer) SignUp

type UnsafeAuthServer

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

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

Jump to

Keyboard shortcuts

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