Documentation ¶
Index ¶
- func RegisterAccountHandler(s server.Server, hdlr AccountHandler, opts ...server.HandlerOption) error
- type AccountHandler
- type AccountService
- type InfoResponse
- func (*InfoResponse) Descriptor() ([]byte, []int)
- func (m *InfoResponse) GetAvatar() string
- func (m *InfoResponse) GetName() string
- func (*InfoResponse) ProtoMessage()
- func (m *InfoResponse) Reset()
- func (m *InfoResponse) String() string
- func (m *InfoResponse) Validate() error
- func (m *InfoResponse) XXX_DiscardUnknown()
- func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InfoResponse) XXX_Merge(src proto.Message)
- func (m *InfoResponse) XXX_Size() int
- func (m *InfoResponse) XXX_Unmarshal(b []byte) error
- type InfoResponseValidationError
- func (e InfoResponseValidationError) Cause() error
- func (e InfoResponseValidationError) Error() string
- func (e InfoResponseValidationError) ErrorName() string
- func (e InfoResponseValidationError) Field() string
- func (e InfoResponseValidationError) Key() bool
- func (e InfoResponseValidationError) Reason() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)
- func (m *LoginRequest) GetPassword() string
- func (m *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (m *LoginRequest) Reset()
- func (m *LoginRequest) String() string
- func (m *LoginRequest) Validate() error
- func (m *LoginRequest) XXX_DiscardUnknown()
- func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginRequest) XXX_Merge(src proto.Message)
- func (m *LoginRequest) XXX_Size() int
- func (m *LoginRequest) XXX_Unmarshal(b []byte) error
- type LoginRequestValidationError
- func (e LoginRequestValidationError) Cause() error
- func (e LoginRequestValidationError) Error() string
- func (e LoginRequestValidationError) ErrorName() string
- func (e LoginRequestValidationError) Field() string
- func (e LoginRequestValidationError) Key() bool
- func (e LoginRequestValidationError) Reason() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)
- func (m *LoginResponse) GetToken() string
- func (*LoginResponse) ProtoMessage()
- func (m *LoginResponse) Reset()
- func (m *LoginResponse) String() string
- func (m *LoginResponse) Validate() error
- func (m *LoginResponse) XXX_DiscardUnknown()
- func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginResponse) XXX_Merge(src proto.Message)
- func (m *LoginResponse) XXX_Size() int
- func (m *LoginResponse) XXX_Unmarshal(b []byte) error
- type LoginResponseValidationError
- func (e LoginResponseValidationError) Cause() error
- func (e LoginResponseValidationError) Error() string
- func (e LoginResponseValidationError) ErrorName() string
- func (e LoginResponseValidationError) Field() string
- func (e LoginResponseValidationError) Key() bool
- func (e LoginResponseValidationError) Reason() string
- type LogoutResponse
- func (*LogoutResponse) Descriptor() ([]byte, []int)
- func (*LogoutResponse) ProtoMessage()
- func (m *LogoutResponse) Reset()
- func (m *LogoutResponse) String() string
- func (m *LogoutResponse) Validate() error
- func (m *LogoutResponse) XXX_DiscardUnknown()
- func (m *LogoutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LogoutResponse) XXX_Merge(src proto.Message)
- func (m *LogoutResponse) XXX_Size() int
- func (m *LogoutResponse) XXX_Unmarshal(b []byte) error
- type LogoutResponseValidationError
- func (e LogoutResponseValidationError) Cause() error
- func (e LogoutResponseValidationError) Error() string
- func (e LogoutResponseValidationError) ErrorName() string
- func (e LogoutResponseValidationError) Field() string
- func (e LogoutResponseValidationError) Key() bool
- func (e LogoutResponseValidationError) Reason() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetId() int64
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) Validate() error
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type RequestValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAccountHandler ¶
func RegisterAccountHandler(s server.Server, hdlr AccountHandler, opts ...server.HandlerOption) error
Types ¶
type AccountHandler ¶
type AccountHandler interface { Login(context.Context, *LoginRequest, *LoginResponse) error Logout(context.Context, *Request, *LogoutResponse) error Info(context.Context, *Request, *InfoResponse) error }
type AccountService ¶
type AccountService interface { Login(ctx context.Context, in *LoginRequest, opts ...client.CallOption) (*LoginResponse, error) Logout(ctx context.Context, in *Request, opts ...client.CallOption) (*LogoutResponse, error) Info(ctx context.Context, in *Request, opts ...client.CallOption) (*InfoResponse, error) }
func NewAccountService ¶
func NewAccountService(name string, c client.Client) AccountService
type InfoResponse ¶
type InfoResponse struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*InfoResponse) Descriptor ¶
func (*InfoResponse) Descriptor() ([]byte, []int)
func (*InfoResponse) GetAvatar ¶
func (m *InfoResponse) GetAvatar() string
func (*InfoResponse) GetName ¶
func (m *InfoResponse) GetName() string
func (*InfoResponse) ProtoMessage ¶
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) Reset ¶
func (m *InfoResponse) Reset()
func (*InfoResponse) String ¶
func (m *InfoResponse) String() string
func (*InfoResponse) Validate ¶
func (m *InfoResponse) Validate() error
Validate checks the field values on InfoResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*InfoResponse) XXX_DiscardUnknown ¶
func (m *InfoResponse) XXX_DiscardUnknown()
func (*InfoResponse) XXX_Marshal ¶
func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InfoResponse) XXX_Merge ¶
func (m *InfoResponse) XXX_Merge(src proto.Message)
func (*InfoResponse) XXX_Size ¶
func (m *InfoResponse) XXX_Size() int
func (*InfoResponse) XXX_Unmarshal ¶
func (m *InfoResponse) XXX_Unmarshal(b []byte) error
type InfoResponseValidationError ¶
type InfoResponseValidationError struct {
// contains filtered or unexported fields
}
InfoResponseValidationError is the validation error returned by InfoResponse.Validate if the designated constraints aren't met.
func (InfoResponseValidationError) Cause ¶
func (e InfoResponseValidationError) Cause() error
Cause function returns cause value.
func (InfoResponseValidationError) Error ¶
func (e InfoResponseValidationError) Error() string
Error satisfies the builtin error interface
func (InfoResponseValidationError) ErrorName ¶
func (e InfoResponseValidationError) ErrorName() string
ErrorName returns error name.
func (InfoResponseValidationError) Field ¶
func (e InfoResponseValidationError) Field() string
Field function returns field value.
func (InfoResponseValidationError) Key ¶
func (e InfoResponseValidationError) Key() bool
Key function returns key value.
func (InfoResponseValidationError) Reason ¶
func (e InfoResponseValidationError) Reason() string
Reason function returns reason value.
type LoginRequest ¶
type LoginRequest 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 (*LoginRequest) Descriptor ¶
func (*LoginRequest) Descriptor() ([]byte, []int)
func (*LoginRequest) GetPassword ¶
func (m *LoginRequest) GetPassword() string
func (*LoginRequest) GetUsername ¶
func (m *LoginRequest) GetUsername() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) Reset ¶
func (m *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (m *LoginRequest) String() string
func (*LoginRequest) Validate ¶
func (m *LoginRequest) Validate() error
Validate checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*LoginRequest) XXX_DiscardUnknown ¶
func (m *LoginRequest) XXX_DiscardUnknown()
func (*LoginRequest) XXX_Marshal ¶
func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginRequest) XXX_Merge ¶
func (m *LoginRequest) XXX_Merge(src proto.Message)
func (*LoginRequest) XXX_Size ¶
func (m *LoginRequest) XXX_Size() int
func (*LoginRequest) XXX_Unmarshal ¶
func (m *LoginRequest) XXX_Unmarshal(b []byte) error
type LoginRequestValidationError ¶
type LoginRequestValidationError struct {
// contains filtered or unexported fields
}
LoginRequestValidationError is the validation error returned by LoginRequest.Validate if the designated constraints aren't met.
func (LoginRequestValidationError) Cause ¶
func (e LoginRequestValidationError) Cause() error
Cause function returns cause value.
func (LoginRequestValidationError) Error ¶
func (e LoginRequestValidationError) Error() string
Error satisfies the builtin error interface
func (LoginRequestValidationError) ErrorName ¶
func (e LoginRequestValidationError) ErrorName() string
ErrorName returns error name.
func (LoginRequestValidationError) Field ¶
func (e LoginRequestValidationError) Field() string
Field function returns field value.
func (LoginRequestValidationError) Key ¶
func (e LoginRequestValidationError) Key() bool
Key function returns key value.
func (LoginRequestValidationError) Reason ¶
func (e LoginRequestValidationError) Reason() string
Reason function returns reason value.
type LoginResponse ¶
type LoginResponse 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 (*LoginResponse) Descriptor ¶
func (*LoginResponse) Descriptor() ([]byte, []int)
func (*LoginResponse) GetToken ¶
func (m *LoginResponse) GetToken() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) Reset ¶
func (m *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (m *LoginResponse) String() string
func (*LoginResponse) Validate ¶
func (m *LoginResponse) Validate() error
Validate checks the field values on LoginResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*LoginResponse) XXX_DiscardUnknown ¶
func (m *LoginResponse) XXX_DiscardUnknown()
func (*LoginResponse) XXX_Marshal ¶
func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginResponse) XXX_Merge ¶
func (m *LoginResponse) XXX_Merge(src proto.Message)
func (*LoginResponse) XXX_Size ¶
func (m *LoginResponse) XXX_Size() int
func (*LoginResponse) XXX_Unmarshal ¶
func (m *LoginResponse) XXX_Unmarshal(b []byte) error
type LoginResponseValidationError ¶
type LoginResponseValidationError struct {
// contains filtered or unexported fields
}
LoginResponseValidationError is the validation error returned by LoginResponse.Validate if the designated constraints aren't met.
func (LoginResponseValidationError) Cause ¶
func (e LoginResponseValidationError) Cause() error
Cause function returns cause value.
func (LoginResponseValidationError) Error ¶
func (e LoginResponseValidationError) Error() string
Error satisfies the builtin error interface
func (LoginResponseValidationError) ErrorName ¶
func (e LoginResponseValidationError) ErrorName() string
ErrorName returns error name.
func (LoginResponseValidationError) Field ¶
func (e LoginResponseValidationError) Field() string
Field function returns field value.
func (LoginResponseValidationError) Key ¶
func (e LoginResponseValidationError) Key() bool
Key function returns key value.
func (LoginResponseValidationError) Reason ¶
func (e LoginResponseValidationError) Reason() string
Reason function returns reason value.
type LogoutResponse ¶
type LogoutResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LogoutResponse) Descriptor ¶
func (*LogoutResponse) Descriptor() ([]byte, []int)
func (*LogoutResponse) ProtoMessage ¶
func (*LogoutResponse) ProtoMessage()
func (*LogoutResponse) Reset ¶
func (m *LogoutResponse) Reset()
func (*LogoutResponse) String ¶
func (m *LogoutResponse) String() string
func (*LogoutResponse) Validate ¶
func (m *LogoutResponse) Validate() error
Validate checks the field values on LogoutResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*LogoutResponse) XXX_DiscardUnknown ¶
func (m *LogoutResponse) XXX_DiscardUnknown()
func (*LogoutResponse) XXX_Marshal ¶
func (m *LogoutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LogoutResponse) XXX_Merge ¶
func (m *LogoutResponse) XXX_Merge(src proto.Message)
func (*LogoutResponse) XXX_Size ¶
func (m *LogoutResponse) XXX_Size() int
func (*LogoutResponse) XXX_Unmarshal ¶
func (m *LogoutResponse) XXX_Unmarshal(b []byte) error
type LogoutResponseValidationError ¶
type LogoutResponseValidationError struct {
// contains filtered or unexported fields
}
LogoutResponseValidationError is the validation error returned by LogoutResponse.Validate if the designated constraints aren't met.
func (LogoutResponseValidationError) Cause ¶
func (e LogoutResponseValidationError) Cause() error
Cause function returns cause value.
func (LogoutResponseValidationError) Error ¶
func (e LogoutResponseValidationError) Error() string
Error satisfies the builtin error interface
func (LogoutResponseValidationError) ErrorName ¶
func (e LogoutResponseValidationError) ErrorName() string
ErrorName returns error name.
func (LogoutResponseValidationError) Field ¶
func (e LogoutResponseValidationError) Field() string
Field function returns field value.
func (LogoutResponseValidationError) Key ¶
func (e LogoutResponseValidationError) Key() bool
Key function returns key value.
func (LogoutResponseValidationError) Reason ¶
func (e LogoutResponseValidationError) Reason() string
Reason function returns reason value.
type Request ¶
type Request struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) Validate ¶
Validate checks the field values on Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type RequestValidationError ¶
type RequestValidationError struct {
// contains filtered or unexported fields
}
RequestValidationError is the validation error returned by Request.Validate if the designated constraints aren't met.
func (RequestValidationError) Cause ¶
func (e RequestValidationError) Cause() error
Cause function returns cause value.
func (RequestValidationError) Error ¶
func (e RequestValidationError) Error() string
Error satisfies the builtin error interface
func (RequestValidationError) ErrorName ¶
func (e RequestValidationError) ErrorName() string
ErrorName returns error name.
func (RequestValidationError) Field ¶
func (e RequestValidationError) Field() string
Field function returns field value.
func (RequestValidationError) Key ¶
func (e RequestValidationError) Key() bool
Key function returns key value.
func (RequestValidationError) Reason ¶
func (e RequestValidationError) Reason() string
Reason function returns reason value.