Documentation ¶
Overview ¶
Package auth is a generated protocol buffer package.
It is generated from these files:
github.com/micro/examples/booking/srv/auth/proto/auth.proto
It has these top-level messages:
Request Result Customer
Package auth is a generated protocol buffer package.
It is generated from these files:
github.com/micro/examples/booking/srv/auth/proto/auth.proto
It has these top-level messages:
Request Result Customer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthHandler ¶
func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.HandlerOption)
Types ¶
type Auth ¶
type Auth struct {
AuthHandler
}
type AuthClient ¶
type AuthClient interface {
VerifyToken(ctx context.Context, in *Request, opts ...client.CallOption) (*Result, error)
}
func NewAuthClient ¶
func NewAuthClient(serviceName string, c client.Client) AuthClient
type AuthHandler ¶
type Customer ¶
type Customer struct { Id int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` AuthToken string `protobuf:"bytes,2,opt,name=authToken" json:"authToken,omitempty"` }
func (*Customer) Descriptor ¶
func (*Customer) GetAuthToken ¶
func (*Customer) ProtoMessage ¶
func (*Customer) ProtoMessage()
type Request ¶
type Request struct {
AuthToken string `protobuf:"bytes,1,opt,name=authToken" json:"authToken,omitempty"`
}
func (*Request) Descriptor ¶
func (*Request) GetAuthToken ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Result ¶
type Result struct {
Customer *Customer `protobuf:"bytes,1,opt,name=customer" json:"customer,omitempty"`
}
func (*Result) Descriptor ¶
func (*Result) GetCustomer ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.