publishing

package
v0.0.0-...-99a799c Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success = 1
	Fail    = 0
)

Variables

View Source
var (
	ErrInvalidUser  = errors.New("invalid user")
	ErrInvalidToken = errors.New("invalid token")
)

Functions

func CheckAccountExist

func CheckAccountExist(s *service, account string) (result *user.User)

func MakeHttpHandler

func MakeHttpHandler(log kitlog.Logger, s Service) *mux.Router

Types

type Endpoints

type Endpoints struct {
	LoginEndpoint    endpoint.Endpoint
	RegisterEndpoint endpoint.Endpoint
}

func MakeEndpoints

func MakeEndpoints(s Service) Endpoints

type Service

type Service interface {
	Login(ctx context.Context, req *loginRequest) (res loginResponse, err error)
	Register(ctx context.Context, req *registerRequest) (res registerResponse, err error)
}

func New

func New(log kitlog.Logger, config *viper.Viper) Service

Jump to

Keyboard shortcuts

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