Documentation ¶
Overview ¶
Package auth is a generated protocol buffer package.
It is generated from these files:
srv/auth/proto/auth.proto
It has these top-level messages:
LoginRequest LoginResult Request Result
Index ¶
- func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.HandlerOption) error
- type AuthHandler
- type AuthService
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)
- func (m *LoginRequest) GetPwd() string
- func (m *LoginRequest) GetUser() string
- func (*LoginRequest) ProtoMessage()
- func (m *LoginRequest) Reset()
- func (m *LoginRequest) String() string
- 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 LoginResult
- func (*LoginResult) Descriptor() ([]byte, []int)
- func (m *LoginResult) GetToken() string
- func (*LoginResult) ProtoMessage()
- func (m *LoginResult) Reset()
- func (m *LoginResult) String() string
- func (m *LoginResult) XXX_DiscardUnknown()
- func (m *LoginResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginResult) XXX_Merge(src proto.Message)
- func (m *LoginResult) XXX_Size() int
- func (m *LoginResult) XXX_Unmarshal(b []byte) error
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetAuthToken() string
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- 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 Result
- func (*Result) Descriptor() ([]byte, []int)
- func (m *Result) GetMsg() string
- func (m *Result) GetState() int64
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) String() string
- func (m *Result) XXX_DiscardUnknown()
- func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Result) XXX_Merge(src proto.Message)
- func (m *Result) XXX_Size() int
- func (m *Result) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthHandler ¶
func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.HandlerOption) error
Types ¶
type AuthHandler ¶
type AuthHandler interface { Login(context.Context, *LoginRequest, *LoginResult) error VerifyToken(context.Context, *Request, *Result) error }
type AuthService ¶
type AuthService interface { Login(ctx context.Context, in *LoginRequest, opts ...client.CallOption) (*LoginResult, error) VerifyToken(ctx context.Context, in *Request, opts ...client.CallOption) (*Result, error) }
func NewAuthService ¶
func NewAuthService(name string, c client.Client) AuthService
type LoginRequest ¶
type LoginRequest struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginRequest) Descriptor ¶
func (*LoginRequest) Descriptor() ([]byte, []int)
func (*LoginRequest) GetPwd ¶
func (m *LoginRequest) GetPwd() string
func (*LoginRequest) GetUser ¶
func (m *LoginRequest) GetUser() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) Reset ¶
func (m *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (m *LoginRequest) String() string
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 LoginResult ¶
type LoginResult 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 (*LoginResult) Descriptor ¶
func (*LoginResult) Descriptor() ([]byte, []int)
func (*LoginResult) GetToken ¶
func (m *LoginResult) GetToken() string
func (*LoginResult) ProtoMessage ¶
func (*LoginResult) ProtoMessage()
func (*LoginResult) Reset ¶
func (m *LoginResult) Reset()
func (*LoginResult) String ¶
func (m *LoginResult) String() string
func (*LoginResult) XXX_DiscardUnknown ¶
func (m *LoginResult) XXX_DiscardUnknown()
func (*LoginResult) XXX_Marshal ¶
func (m *LoginResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginResult) XXX_Merge ¶
func (m *LoginResult) XXX_Merge(src proto.Message)
func (*LoginResult) XXX_Size ¶
func (m *LoginResult) XXX_Size() int
func (*LoginResult) XXX_Unmarshal ¶
func (m *LoginResult) XXX_Unmarshal(b []byte) error
type Request ¶
type Request struct { AuthToken string `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetAuthToken ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Result ¶
type Result struct { State int64 `protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Result) Descriptor ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) XXX_DiscardUnknown ¶
func (m *Result) XXX_DiscardUnknown()
func (*Result) XXX_Marshal ¶
func (*Result) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.