service

package
v0.0.0-...-fc3792f Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 14 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 {
	// contains filtered or unexported fields
}

Service service.

func New

func New() (s *Service)

New new a service and return.

func (*Service) AddInfo

func (s *Service) AddInfo(ctx context.Context, name, password string) (mid int64, err error)

func (*Service) CheckPassword

func (s *Service) CheckPassword(ctx context.Context, mid int64, password string) (pass bool, err error)

Check password

func (*Service) Close

func (s *Service) Close()

Close close the resource.

func (*Service) FilterName

func (s *Service) FilterName(ctx context.Context, name string) (pass bool)

func (*Service) GeneratePassword

func (s *Service) GeneratePassword(ctx context.Context, password string) (hash_password string, err error)

Hash password

func (*Service) GenerateToken

func (s *Service) GenerateToken(ctx context.Context) (token string, err error)

Generate unique token

func (*Service) GetInfo

func (s *Service) GetInfo(ctx context.Context, mid int64) (info *api.Info, err error)

func (*Service) GetMidByName

func (s *Service) GetMidByName(ctx context.Context, name string) (mid int64, err error)

func (*Service) GetProfile

func (s *Service) GetProfile(ctx context.Context, mid int64) (profile *api.Profile, err error)

func (*Service) GetToken

func (s *Service) GetToken(ctx context.Context, mid int64) (token string, err error)

Get token by mid

func (*Service) NextID

func (s *Service) NextID(ctx context.Context) (id int64, err error)

Rpc nextId

func (*Service) Ping

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

Ping ping the resource.

func (*Service) SetEmail

func (s *Service) SetEmail(ctx context.Context, mid int64, email string) (err error)

func (*Service) SetFace

func (s *Service) SetFace(ctx context.Context, mid int64, face string) (err error)

func (*Service) SetName

func (s *Service) SetName(ctx context.Context, name string, mid int64) (err error)

func (*Service) SetPassword

func (s *Service) SetPassword(ctx context.Context, mid int64, password string) (err error)

func (*Service) SetPhone

func (s *Service) SetPhone(ctx context.Context, mid int64, phone string) (err error)

func (*Service) SetSex

func (s *Service) SetSex(ctx context.Context, mid int64, sex string) (err error)

func (*Service) SetToken

func (s *Service) SetToken(ctx context.Context, token string, mid int64) (err error)

Set Token to auth

Jump to

Keyboard shortcuts

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