service

package
v0.0.0-...-e2b7729 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoleService

type RoleService interface {
	// auth + admin
	Create(ctx context.Context, data model.RoleCreate) (id int, err error)
	GetByID(ctx context.Context, id int) (role model.RoleResponse, err error)
	GetAll(ctx context.Context, filter model.RequestGetAll) (roles []model.RoleResponse, total int, err error)
	Update(ctx context.Context, data model.RoleUpdate) (err error)
	Delete(ctx context.Context, id int) (err error)
}

func NewRoleService

func NewRoleService() RoleService

type RoleServiceImpl

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

func (*RoleServiceImpl) Create

func (svc *RoleServiceImpl) Create(ctx context.Context, data model.RoleCreate) (id int, err error)

func (*RoleServiceImpl) Delete

func (svc *RoleServiceImpl) Delete(ctx context.Context, id int) (err error)

func (*RoleServiceImpl) GetAll

func (svc *RoleServiceImpl) GetAll(ctx context.Context, filter model.RequestGetAll) (roles []model.RoleResponse, total int, err error)

func (*RoleServiceImpl) GetByID

func (svc *RoleServiceImpl) GetByID(ctx context.Context, id int) (role model.RoleResponse, err error)

func (*RoleServiceImpl) Update

func (svc *RoleServiceImpl) Update(ctx context.Context, data model.RoleUpdate) (err error)

Jump to

Keyboard shortcuts

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