user

package
v0.0.0-...-80e21b9 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenLength = 36
	BcryptCost  = 12
)

Variables

This section is empty.

Functions

func Initialize

func Initialize(db *gorm.DB, us *Service) error

Types

type Service

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

func New

func New(db *gorm.DB) *Service

func (*Service) Create

func (s *Service) Create(name string, api bool, deploy bool, paths []string) (*entity.User, string, error)

func (*Service) Delete

func (s *Service) Delete(id uint) error

func (*Service) GetAll

func (s *Service) GetAll(limit, offset uint64) ([]entity.User, uint64, error)

func (*Service) GetByName

func (s *Service) GetByName(name string) (*entity.User, error)

func (*Service) GetPaths

func (s *Service) GetPaths(user *entity.User) ([]entity.Path, error)

func (*Service) Update

func (s *Service) Update(id uint, deploy bool, paths []string) (*entity.User, error)

func (*Service) UpdateToken

func (s *Service) UpdateToken(id uint) (*entity.User, string, error)

Jump to

Keyboard shortcuts

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