api

package
v0.0.0-...-ad423bc Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOperationNames

func GetOperationNames(role Role) []string

func GetRoleNames

func GetRoleNames() []string

func InitializeOperations

func InitializeOperations(cfgDir string) error

func RegisterNewOp

func RegisterNewOp(name string, f NewOpFunc)

Types

type NewOpFunc

type NewOpFunc func(Role, string) (Operation, error)

type Operation

type Operation interface {
	Name() string
	Role() Role
	Go(w http.ResponseWriter, r *http.Request) error
}

func GetOperation

func GetOperation(role Role, name string) (Operation, error)

type OperationConfig

type OperationConfig struct {
	Enable bool `json:"enable" yaml:"enable"`
}

type Role

type Role string

Jump to

Keyboard shortcuts

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