services

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IssueToken

func IssueToken(user *models.User) (string, error)

IssueToken Issue access token

Types

type NodeInterface

type NodeInterface interface {
	FindByID(id string) (*models.Node, error)
}

func NewNodeService

func NewNodeService() NodeInterface

type NodeService

type NodeService struct {
}

func (*NodeService) FindByID

func (service *NodeService) FindByID(id string) (*models.Node, error)

FindByID Get node by id

type PermissionInterface

type PermissionInterface interface {
}

func NewPermissionService

func NewPermissionService() PermissionInterface

type PermissionService

type PermissionService struct {
}

type PipelineInterface

type PipelineInterface interface {
}

func NewPipelineService

func NewPipelineService() PipelineInterface

type PipelineService

type PipelineService struct {
}

type RoleInterface

type RoleInterface interface {
}

func NewRoleService

func NewRoleService() RoleInterface

type RoleService

type RoleService struct {
}

type TaskInterface

type TaskInterface interface {
	Tasks(pipline bool) []models.Task
	NormalTasks() ([]models.Task, error)
}

func NewTaskService

func NewTaskService() TaskInterface

type TaskService

type TaskService struct {
}

func (*TaskService) NormalTasks

func (service *TaskService) NormalTasks() ([]models.Task, error)

NormalTasks 获取需要执行的任务

func (*TaskService) Tasks

func (service *TaskService) Tasks(pipline bool) []models.Task

Tasks 获取任务列表

type UserInterface

type UserInterface interface {
	Users(params map[string]string) (*[]models.User, *response.Meta)
	FindByID(id string) (*models.User, error)
	FindByEmail(email string) *models.User
	Attempt(username, password string) (string, error)
	Destroy(id string, force bool) error
}

func NewUserService

func NewUserService() UserInterface

type UserService

type UserService struct {
}

func (*UserService) Attempt

func (service *UserService) Attempt(username, passwod string) (token string, err error)

Attempt user credentials

func (*UserService) Destroy

func (service *UserService) Destroy(id string, force bool) (err error)

Destroy Delete user

func (*UserService) FindByEmail

func (service *UserService) FindByEmail(email string) *models.User

FindByEmail Get user by email

func (*UserService) FindByID

func (service *UserService) FindByID(id string) (*models.User, error)

FindByID Get user

func (*UserService) RetrieveByCredentials

func (service *UserService) RetrieveByCredentials(username, password string) (user *models.User, err error)

RetrieveByCredentials Get user by credentials

func (*UserService) Users

func (service *UserService) Users(params map[string]string) (*[]models.User, *response.Meta)

Users Get users list

Jump to

Keyboard shortcuts

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