user

package
v0.0.0-...-bceaf69 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	goyave.Component
	UserService    Service
	StorageService StorageService
}

func NewController

func NewController() *Controller

func (*Controller) Init

func (ctrl *Controller) Init(server *goyave.Server)

func (*Controller) Register

func (ctrl *Controller) Register(response *goyave.Response, request *goyave.Request)

func (*Controller) RegisterRequest

func (ctrl *Controller) RegisterRequest(_ *goyave.Request) v.RuleSet

func (*Controller) RegisterRoutes

func (ctrl *Controller) RegisterRoutes(router *goyave.Router)

func (*Controller) ShowAvatar

func (ctrl *Controller) ShowAvatar(response *goyave.Response, request *goyave.Request)

func (*Controller) ShowProfile

func (ctrl *Controller) ShowProfile(response *goyave.Response, request *goyave.Request)

func (*Controller) Update

func (ctrl *Controller) Update(response *goyave.Response, request *goyave.Request)

func (*Controller) UpdateRequest

func (ctrl *Controller) UpdateRequest(_ *goyave.Request) v.RuleSet

type Service

type Service interface {
	UniqueScope() func(db *gorm.DB, val any) *gorm.DB
	GetByID(ctx context.Context, id uint) (*dto.InternalUser, error)
	Register(ctx context.Context, registerDTO *dto.RegisterUser) error
	Update(ctx context.Context, id uint, updateDTO *dto.UpdateUser) error
}

type StorageService

type StorageService interface {
	GetFS() fs.StatFS
	GetEmbedImagesFS() fs.StatFS
}

Jump to

Keyboard shortcuts

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