service

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Cfgpath string
	// contains filtered or unexported fields
}

Service service.

func New

func New(cfgpath string) (s *Service)

New new a service and return.

func (*Service) Close

func (s *Service) Close()

Close close the resource.

func (*Service) CreateUser

func (s *Service) CreateUser(c context.Context, user *model.User) error

func (*Service) DeleteUser

func (s *Service) DeleteUser(c context.Context, uid int64) error

func (*Service) Ping

func (s *Service) Ping(ctx context.Context) (err error)

Ping ping the resource.

func (*Service) ReadGrpcPingCount

func (s *Service) ReadGrpcPingCount(c context.Context) model.PingCount

func (*Service) ReadHttpPingCount

func (s *Service) ReadHttpPingCount(c context.Context) model.PingCount

func (*Service) ReadUser

func (s *Service) ReadUser(c context.Context, uid int64) (model.User, error)

func (*Service) UpdateGrpcPingCount

func (s *Service) UpdateGrpcPingCount(c context.Context, pingcount model.PingCount)

grpc

func (*Service) UpdateHttpPingCount

func (s *Service) UpdateHttpPingCount(c context.Context, pingcount model.PingCount)

http

func (*Service) UpdateUser

func (s *Service) UpdateUser(c context.Context, user *model.User) error

type ServiceConfig

type ServiceConfig struct {
	Cfgversion string `yaml:"cfgversion"`
}

Service conf

Jump to

Keyboard shortcuts

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