admin

package
v0.4.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorDuplicatePath = errors.New("path duplicate")
	ErrorNotExist      = errors.New("not exits")
	ErrorNotMatch      = errors.New("not match profession")
)

Functions

func Register

func Register(myPre string, handler ICreateHandler) error

Types

type Admin

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

func NewAdmin

func NewAdmin(professions eosc.IProfessions, workers eosc.IWorkersData) *Admin

func (*Admin) Delete

func (a *Admin) Delete(profession, name string) (interface{}, error)

func (*Admin) DriverInfo

func (a *Admin) DriverInfo(profession, driver string) (*eosc.DriverDetail, error)

func (*Admin) Drivers

func (a *Admin) Drivers(profession string) ([]*eosc.DriverInfo, error)

func (*Admin) DriversItem

func (a *Admin) DriversItem(profession string) ([]*eosc.Item, error)

func (*Admin) GetEmployee

func (a *Admin) GetEmployee(profession, name string) (interface{}, error)

func (*Admin) ListEmployees

func (a *Admin) ListEmployees(profession string) ([]interface{}, error)

func (*Admin) ListProfessions

func (a *Admin) ListProfessions() []*eosc.ProfessionInfo

func (*Admin) ServeHTTP

func (a *Admin) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Admin) Update

func (a *Admin) Update(profession, name, driver string, data []byte) (interface{}, error)

type ICreateHandler added in v0.3.3

type ICreateHandler interface {
	Create(admin eosc.IAdmin, pref string) http.Handler
}

type WorkerInfo

type WorkerInfo map[string]interface{}

Jump to

Keyboard shortcuts

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