services

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 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)

Issue access token

Types

type LogInterface

type LogInterface interface {
}

func NewLogService

func NewLogService() LogInterface

type LogService

type LogService struct {
}

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)

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)

获取需要执行的任务

func (*TaskService) Tasks

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

获取任务列表

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)

Delete user

func (*UserService) FindByEmail

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

Get user by email

func (*UserService) FindByID

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

Get user

func (*UserService) RetrieveByCredentials

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

Get user by credentials

func (*UserService) Users

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

Get users list

Jump to

Keyboard shortcuts

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