api

package
v0.0.0-...-7c21e21 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoKind      = "k"
	InfoName      = "n"
	InfoNamespace = "ns"
	InfoTimestamp = "ts"
	InfoExpiry    = "e"
)
View Source
const (
	ConfigDir                 = "/etc/baetyl"
	FunctionConfigPrefix      = "baetyl-function-config"
	FunctionCodePrefix        = "baetyl-function-code"
	FunctionDefaultConfigFile = "service.yml"
)
View Source
const (
	ConfigTypeKV       = "kv"
	ConfigTypeObject   = "object"
	ConfigTypeFunction = "function"
)

Variables

View Source
var (
	ErrInvalidToken = fmt.Errorf("invalid token")
	SystemApps      = []common.SystemApplication{
		common.BaetylCore,
		common.BaetylFunction,
	}
)
View Source
var (
	CmdExpirationInSeconds = int64(60 * 60)
)

Functions

This section is empty.

Types

type API

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

API baetyl api server

func NewAPI

func NewAPI(config *config.CloudConfig) (*API, error)

NewAPI NewAPI

func (*API) Active

func (api *API) Active(c *common.Context) (interface{}, error)

func (*API) CreateApplication

func (api *API) CreateApplication(c *common.Context) (interface{}, error)

CreateApplication create one application

func (*API) CreateBatch

func (api *API) CreateBatch(c *common.Context) (interface{}, error)

CreateBatch create one node

func (*API) CreateCallback

func (api *API) CreateCallback(c *common.Context) (interface{}, error)

func (*API) CreateConfig

func (api *API) CreateConfig(c *common.Context) (interface{}, error)

CreateConfig create one config

func (*API) CreateNamespace

func (api *API) CreateNamespace(c *common.Context) (interface{}, error)

CreateNamespace create one namespace

func (*API) CreateNode

func (api *API) CreateNode(c *common.Context) (interface{}, error)

CreateNode create one node

func (*API) CreateRecord

func (api *API) CreateRecord(c *common.Context) (interface{}, error)

func (*API) CreateRegistry

func (api *API) CreateRegistry(c *common.Context) (interface{}, error)

CreateRegistry create one Registry

func (*API) CreateSecret

func (api *API) CreateSecret(c *common.Context) (interface{}, error)

CreateSecret create one secret

func (*API) DeleteApplication

func (api *API) DeleteApplication(c *common.Context) (interface{}, error)

DeleteApplication delete the application

func (*API) DeleteBatch

func (api *API) DeleteBatch(c *common.Context) (interface{}, error)

func (*API) DeleteCallback

func (api *API) DeleteCallback(c *common.Context) (interface{}, error)

func (*API) DeleteConfig

func (api *API) DeleteConfig(c *common.Context) (interface{}, error)

DeleteConfig delete the config

func (*API) DeleteNamespace

func (api *API) DeleteNamespace(c *common.Context) (interface{}, error)

func (*API) DeleteNode

func (api *API) DeleteNode(c *common.Context) (interface{}, error)

DeleteNode delete the node

func (*API) DeleteRecord

func (api *API) DeleteRecord(c *common.Context) (interface{}, error)

func (*API) DeleteRegistry

func (api *API) DeleteRegistry(c *common.Context) (interface{}, error)

DeleteRegistry delete the Registry

func (*API) DeleteSecret

func (api *API) DeleteSecret(c *common.Context) (interface{}, error)

DeleteSecret delete the secret

func (*API) Desire

func (api *API) Desire(c *common.Context) (interface{}, error)

Desire for node synchronize desire info

func (*API) DownloadRecords

func (api *API) DownloadRecords(c *common.Context) (interface{}, error)

func (*API) GenCoreApp

func (api *API) GenCoreApp(nodeName, ns string, isSys bool) (*specV1.Application, error)

func (*API) GenFunctionApp

func (api *API) GenFunctionApp(nodeName, ns string, isSys bool) (*specV1.Application, error)

func (*API) GenInitCmdFromBatch

func (api *API) GenInitCmdFromBatch(c *common.Context) (interface{}, error)

func (*API) GenInitCmdFromNode

func (api *API) GenInitCmdFromNode(c *common.Context) (interface{}, error)

GenInitCmdFromNode generate install command

func (*API) GenRecordRandom

func (api *API) GenRecordRandom(c *common.Context) (interface{}, error)

func (*API) GenSysApp

func (api *API) GenSysApp(nodeName, ns string, appList []common.SystemApplication) ([]specV1.Application, error)

func (*API) GetAppByConfig

func (api *API) GetAppByConfig(c *common.Context) (interface{}, error)

func (*API) GetAppByNode

func (api *API) GetAppByNode(c *common.Context) (interface{}, error)

GetAppByNode list app

func (*API) GetAppByRegistry

func (api *API) GetAppByRegistry(c *common.Context) (interface{}, error)

GetAppByRegistry list app

func (*API) GetAppBySecret

func (api *API) GetAppBySecret(c *common.Context) (interface{}, error)

GetAppBySecret list app

func (*API) GetApplication

func (api *API) GetApplication(c *common.Context) (interface{}, error)

GetApplication get a application

func (*API) GetBatch

func (api *API) GetBatch(c *common.Context) (interface{}, error)

func (*API) GetCallback

func (api *API) GetCallback(c *common.Context) (interface{}, error)

func (*API) GetConfig

func (api *API) GetConfig(c *common.Context) (interface{}, error)

GetConfig get a config

func (*API) GetNamespace

func (api *API) GetNamespace(c *common.Context) (interface{}, error)

GetNamespace get one namespace

func (*API) GetNode

func (api *API) GetNode(c *common.Context) (interface{}, error)

GetNode get a node

func (*API) GetNodeDeployHistory

func (api *API) GetNodeDeployHistory(c *common.Context) (interface{}, error)

GetNodeDeployHistory list node // TODO will support later

func (*API) GetNodeStats

func (api *API) GetNodeStats(c *common.Context) (interface{}, error)

GetNodeStats get a node stats

func (*API) GetRecord

func (api *API) GetRecord(c *common.Context) (interface{}, error)

func (*API) GetRegistry

func (api *API) GetRegistry(c *common.Context) (interface{}, error)

GetRegistry get a Registry

func (*API) GetResource

func (api *API) GetResource(c *common.Context) (interface{}, error)

func (*API) GetSecret

func (api *API) GetSecret(c *common.Context) (interface{}, error)

GetSecret get a secret

func (*API) GetSysConfig

func (api *API) GetSysConfig(c *common.Context) (interface{}, error)

GetSysConfig get a system config

func (*API) ImportFunction

func (api *API) ImportFunction(c *common.Context) (interface{}, error)

ImportFunction ImportFunction

func (*API) ListApplication

func (api *API) ListApplication(c *common.Context) (interface{}, error)

ListApplication list application

func (*API) ListBatch

func (api *API) ListBatch(c *common.Context) (interface{}, error)

func (*API) ListBucketObjects

func (api *API) ListBucketObjects(c *common.Context) (interface{}, error)

ListBucketObjects ListBucketObjects

func (*API) ListBuckets

func (api *API) ListBuckets(c *common.Context) (interface{}, error)

ListBuckets ListBuckets

func (*API) ListConfig

func (api *API) ListConfig(c *common.Context) (interface{}, error)

ListConfig list config

func (*API) ListFunctionSources

func (api *API) ListFunctionSources(c *common.Context) (interface{}, error)

ListFunctionSources ListFunctionSources

func (*API) ListFunctionVersions

func (api *API) ListFunctionVersions(c *common.Context) (interface{}, error)

ListFunctionVersions list versions of a function

func (*API) ListFunctions

func (api *API) ListFunctions(c *common.Context) (interface{}, error)

ListFunctions list functions

func (*API) ListNode

func (api *API) ListNode(c *common.Context) (interface{}, error)

ListNode list node

func (*API) ListObjectSources

func (api *API) ListObjectSources(c *common.Context) (interface{}, error)

func (*API) ListRecord

func (api *API) ListRecord(c *common.Context) (interface{}, error)

func (*API) ListRegistry

func (api *API) ListRegistry(c *common.Context) (interface{}, error)

ListRegistry list Registry

func (*API) ListSecret

func (api *API) ListSecret(c *common.Context) (interface{}, error)

ListSecret list secret

func (*API) ListSysConfig

func (api *API) ListSysConfig(c *common.Context) (interface{}, error)

func (*API) NodeNumberCollector

func (api *API) NodeNumberCollector(namespace string) (map[string]int, error)

func (*API) ParseTemplate

func (api *API) ParseTemplate(key string, data map[string]string) ([]byte, error)

func (*API) RefreshRegistryPassword

func (api *API) RefreshRegistryPassword(c *common.Context) (interface{}, error)

func (*API) Report

func (api *API) Report(c *common.Context) (interface{}, error)

Report for node report

func (*API) UpdateApplication

func (api *API) UpdateApplication(c *common.Context) (interface{}, error)

UpdateApplication update the application

func (*API) UpdateBatch

func (api *API) UpdateBatch(c *common.Context) (interface{}, error)

func (*API) UpdateCallback

func (api *API) UpdateCallback(c *common.Context) (interface{}, error)

func (*API) UpdateConfig

func (api *API) UpdateConfig(c *common.Context) (interface{}, error)

UpdateConfig update the config

func (*API) UpdateNode

func (api *API) UpdateNode(c *common.Context) (interface{}, error)

UpdateNode update the node

func (*API) UpdateRecord

func (api *API) UpdateRecord(c *common.Context) (interface{}, error)

func (*API) UpdateRegistry

func (api *API) UpdateRegistry(c *common.Context) (interface{}, error)

UpdateRegistry update the Registry

func (*API) UpdateSecret

func (api *API) UpdateSecret(c *common.Context) (interface{}, error)

UpdateSecret update the secret

Jump to

Keyboard shortcuts

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