service

package
v0.0.0-...-1911959 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentTypeService

type ContentTypeService interface {
	CreateContentType(int, string, string) (string, error)
	DeleteContentType(int, string) error
	UpdateColName(int, string, string, string) error
	AddCol(int, string, string) error
	DeleteCol(int, string, string) error
}

type DefaultContentTypeService

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

func (DefaultContentTypeService) AddCol

func (s DefaultContentTypeService) AddCol(userId int, contentTypeId, col string) error

func (DefaultContentTypeService) CreateContentType

func (s DefaultContentTypeService) CreateContentType(userId int, name, cols string) (string, error)

func (DefaultContentTypeService) DeleteCol

func (s DefaultContentTypeService) DeleteCol(userId int, contentTypeId, col string) error

func (DefaultContentTypeService) DeleteContentType

func (s DefaultContentTypeService) DeleteContentType(userId int, contentTypeId string) error

func (DefaultContentTypeService) UpdateColName

func (s DefaultContentTypeService) UpdateColName(userId int, contentTypeId, oldName, newName string) error

type DefaultRoleService

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

func NewRoleService

func NewRoleService(repository role.RoleRepository) DefaultRoleService

func (DefaultRoleService) Create

func (s DefaultRoleService) Create(newRole role.Role) (int, error)

func (DefaultRoleService) Delete

func (s DefaultRoleService) Delete(roleId int) error

func (DefaultRoleService) Read

func (s DefaultRoleService) Read() ([]role.Role, error)

type DefaultUserService

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

func NewUserService

func NewUserService(repository user.UserRepository) DefaultUserService

func (DefaultUserService) InsertOTP

func (s DefaultUserService) InsertOTP(user *user.User) error

func (DefaultUserService) Login

func (s DefaultUserService) Login(user user.User) (string, error)

func (DefaultUserService) ReadOTP

func (s DefaultUserService) ReadOTP(user *user.User) (string, error)

func (DefaultUserService) Signup

func (s DefaultUserService) Signup(user user.User) (int, error)

func (DefaultUserService) VerifyEmail

func (s DefaultUserService) VerifyEmail(user *user.User) error

type RoleService

type RoleService interface {
	Create(role.Role) (int, error)
	Read() ([]role.Role, error)
	Delete(int) error
}

type UserService

type UserService interface {
	Login(user.User) (string, error)
	Signup(user.User) (int, error)
	// InsertOTP saves otp into database
	InsertOTP(*user.User) error
	// VerifyEmail sets email_verified column to true
	VerifyEmail(*user.User) error
	// ReadOTP gets otp from database
	ReadOTP(*user.User) (string, error)
}

Jump to

Keyboard shortcuts

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