service

package
v0.0.0-...-967a65d Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (c *ClientService) CreateUser(ctx context.Context, user *userpb.User) (int, error)

func (*ClientService) DeleteUser

func (c *ClientService) DeleteUser(ctx context.Context, id int) error

func (*ClientService) GetAllUser

func (c *ClientService) GetAllUser(ctx context.Context) ([]*userpb.User, error)

func (*ClientService) IssueToken

func (c *ClientService) IssueToken(ctx context.Context, user *userpb.User) (string, error)

Jump to

Keyboard shortcuts

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