app

package
v0.0.0-...-a41176a Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidSize erres.Error = "invalid size"
View Source
const InvalidUserUUID erres.Error = "invalid user uuid"
View Source
const Overdue erres.Error = "key is overdue"

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	UserUUID string
}

type PageUser

type PageUser interface {
	GetPage() Page
	IsPageUser()
}

type PageUserFull

type PageUserFull struct {
	Page
	data.ViewUserFull
}

func (*PageUserFull) GetPage

func (p *PageUserFull) GetPage() Page

func (*PageUserFull) IsPageUser

func (p *PageUserFull) IsPageUser()

type Service

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

func NewService

func NewService(log *zap.Logger, connection *data.Connection) (*Service, error)

func (*Service) ContentAvatar

func (s *Service) ContentAvatar(userUUID string, size string) ([]byte, error)

func (*Service) Data

func (s *Service) Data() *data.Connection

func (*Service) LogIn

func (s *Service) LogIn(key, login string, password string) (string, error)

func (*Service) LogOut

func (s *Service) LogOut(key string) error

func (*Service) SessionKeyDuration

func (s *Service) SessionKeyDuration() int

func (*Service) SignUp

func (s *Service) SignUp(key, login, password string) (string, error)

func (*Service) UserGet

func (s *Service) UserGet(key string, uuid string) (PageUser, error)

func (*Service) UserSet

func (s *Service) UserSet(uuid, nick, name string) error

Jump to

Keyboard shortcuts

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