service

package
v0.0.0-...-a54da22 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 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 IAuthService

type IAuthService interface {
	Login(data payload.LoginPayload) (payload.AuthModel, error)
	Register(data payload.RegisterPayload) (payload.AuthModel, error)
	Logout(data payload.LogoutPayload) (payload.LogoutModel, error)
	ClaimToken(data entity.User) (payload.JWTClaimResult, error)
	CheckValidToken(token string, userID uint) bool
}

func NewAuthService

func NewAuthService(opt Option) IAuthService

type IHealthCheck

type IHealthCheck interface {
	HealthCheckDbMysql() error
	HealthCheckDbCache() error
}

func NewHealthCheck

func NewHealthCheck(opt Option) IHealthCheck

type IProjectService

type IProjectService interface {
	GetAll(pyld payload.ProjectGetAllPayload) ([]entity.Project, error)
	Get(pyld payload.ProjectGetPayload) (entity.Project, error)
	AddProject(pyld payload.ProjectCreatePayload) (entity.Project, error)
	UpdateProject(pyld payload.ProjectUpdatePayload) (entity.Project, error)
	DeleteProject(pyld payload.ProjectDeletePayload) error
}

func NewProjectService

func NewProjectService(opt Option) IProjectService

type ITagService

type ITagService interface {
	GetAllTag() ([]entity.Tag, error)
	GetTag(pyld payload.TagGetPayload) (entity.Tag, error)
	CreateTag(pyld payload.TagCreatePayload) (entity.Tag, error)
	UpdateTag(pyld payload.TagUpdatePayload) (entity.Tag, error)
	DeleteTag(pyld payload.TagDeletePayload) error
}

func NewTagService

func NewTagService(opt Option) ITagService

type ITaskService

type ITaskService interface {
	GetAll(pyld payload.TaskQueryPayload) ([]entity.Task, error)
	GetByID(pyld payload.TaskGetPayload) (entity.Task, error)
	AddTask(pyld payload.TaskCreatePayload) (entity.Task, error)
	Update(pyld payload.TaskUpdatePayload) (entity.Task, error)
	Delete(pyld payload.TaskDeletePayload) error
	ChangeState(pyld payload.TaskStatePayload) (entity.Task, error)
}

func NewTaskService

func NewTaskService(opt Option) ITaskService

type IUserService

type IUserService interface {
	GetAll() ([]entity.User, error)
	GetByID(id int) (entity.User, error)
	AddUser(user entity.User) (entity.User, error)
	GetByEmail(email string) (entity.User, error)
	Update(user entity.User) (entity.User, error)
	Delete(id int) error
}

func NewUserService

func NewUserService(opt Option) IUserService

type Option

type Option struct {
	commons.Options
	*repository.Repository
}

Option anything any service object needed

type Services

type Services struct {
	HealthCheck IHealthCheck
	Auth        IAuthService
	User        IUserService
	Project     IProjectService
	Task        ITaskService
	Tag         ITagService
}

Services all service object injected here

Jump to

Keyboard shortcuts

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