mu_micro_book_srv_auth

package
v0.0.0-...-908d554 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterServiceHandler

func RegisterServiceHandler(s server.Server, hdlr ServiceHandler, opts ...server.HandlerOption) error

Types

type Error

type Error struct {
	Code                 int32    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Detail               string   `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Error) Descriptor

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

func (*Error) GetCode

func (m *Error) GetCode() int32

func (*Error) GetDetail

func (m *Error) GetDetail() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (m *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error

type Request

type Request struct {
	UserId               int64    `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	UserName             string   `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
	Token                string   `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Request) Descriptor

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

func (*Request) GetToken

func (m *Request) GetToken() string

func (*Request) GetUserId

func (m *Request) GetUserId() int64

func (*Request) GetUserName

func (m *Request) GetUserName() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Error                *Error   `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	Token                string   `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetError

func (m *Response) GetError() *Error

func (*Response) GetSuccess

func (m *Response) GetSuccess() bool

func (*Response) GetToken

func (m *Response) GetToken() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type Service

type Service interface {
	MakeAccessToken(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
	DelUserAccessToken(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
	GetCachedAccessToken(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
}

func NewService

func NewService(name string, c client.Client) Service

type ServiceHandler

type ServiceHandler interface {
	MakeAccessToken(context.Context, *Request, *Response) error
	DelUserAccessToken(context.Context, *Request, *Response) error
	GetCachedAccessToken(context.Context, *Request, *Response) error
}

Jump to

Keyboard shortcuts

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