app

package
v0.0.0-...-fe94214 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExitHook

func AddExitHook(hook func() error)

func Exit

func Exit() error

func Init

func Init() error

func Postgres

func Postgres() *pg.DB

func RedisCache

func RedisCache() *cache.Cache

func RedisRing

func RedisRing() *redis.Ring

func Run

func Run() error

Types

type LookupService

type LookupService struct {
	rpc.UnimplementedLookupServiceServer
	Users UserService
}

func (*LookupService) Authorize

type User

type User struct {
	Id           uuid.UUID `pg:"id"`
	Username     string    `json:"username" pg:"username"`
	Hash         []byte    `json:"-" pg:"hash"`
	Salt         []byte    `json:"-" pg:"salt"`
	CreationDate time.Time `json:"creation_date" pg:"creation_date"`
	// contains filtered or unexported fields
}

type UserService

type UserService interface {
	SelectUser(ctx context.Context, id uuid.UUID) (*User, error)
	SelectUserByUsername(ctx context.Context, username string) (*User, error)
}

Jump to

Keyboard shortcuts

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