Documentation
¶
Index ¶
- func NewTokenAuthCreds(token string) *tokenAuthCreds
- func TimingInterceptor(ctx context.Context, method string, req interface{}, reply interface{}, ...) error
- type ClientService
- func (c *ClientService) AuthUser(ctx context.Context, token string) error
- func (c *ClientService) CreateUser(ctx context.Context, user *userpb.User) (int, error)
- func (c *ClientService) DeleteUser(ctx context.Context, id int) error
- func (c *ClientService) GetAllUser(ctx context.Context) ([]*userpb.User, error)
- func (c *ClientService) IssueToken(ctx context.Context, user *userpb.User) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTokenAuthCreds ¶
func NewTokenAuthCreds(token string) *tokenAuthCreds
func TimingInterceptor ¶
func TimingInterceptor( ctx context.Context, method string, req interface{}, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption, ) error
Types ¶
type ClientService ¶
type ClientService struct {
// contains filtered or unexported fields
}
func NewClientService ¶
func NewClientService(cs userpb.UserServiceClient) *ClientService
func (*ClientService) AuthUser ¶
func (c *ClientService) AuthUser(ctx context.Context, token string) error
func (*ClientService) CreateUser ¶
func (*ClientService) DeleteUser ¶
func (c *ClientService) DeleteUser(ctx context.Context, id int) error
func (*ClientService) GetAllUser ¶
func (*ClientService) IssueToken ¶
Click to show internal directories.
Click to hide internal directories.