Documentation
¶
Index ¶
- Constants
- func CheckAndParseToken(token string, genToken func(map[string]interface{}) (string, error)) (map[string]interface{}, error)
- type API
- func (api *API) CreateApplication(c *common.Context) (interface{}, error)
- func (api *API) CreateCertificate(c *common.Context) (interface{}, error)
- func (api *API) CreateConfig(c *common.Context) (interface{}, error)
- func (api *API) CreateNamespace(c *common.Context) (interface{}, error)
- func (api *API) CreateNode(c *common.Context) (interface{}, error)
- func (api *API) CreateProperty(c *common.Context) (interface{}, error)
- func (api *API) CreateQuota(c *common.Context) (interface{}, error)
- func (api *API) CreateQuotas(namespace string, quotas map[string]int) error
- func (api *API) CreateRegistry(c *common.Context) (interface{}, error)
- func (api *API) CreateSecret(c *common.Context) (interface{}, error)
- func (api *API) DeleteApplication(c *common.Context) (interface{}, error)
- func (api *API) DeleteCertificate(c *common.Context) (interface{}, error)
- func (api *API) DeleteConfig(c *common.Context) (interface{}, error)
- func (api *API) DeleteNamespace(c *common.Context) (interface{}, error)
- func (api *API) DeleteNode(c *common.Context) (interface{}, error)
- func (api *API) DeleteNodeAndAppIndex(namespace string, app *specV1.Application) error
- func (api *API) DeleteProperty(c *common.Context) (interface{}, error)
- func (api *API) DeleteQuota(c *common.Context) (interface{}, error)
- func (api *API) DeleteQuotaByNamespace(namespace string) error
- func (api *API) DeleteRegistry(c *common.Context) (interface{}, error)
- func (api *API) DeleteSecret(c *common.Context) (interface{}, error)
- func (api *API) GenInitCmdFromNode(c *common.Context) (interface{}, error)
- func (api *API) GetAppByCertificate(c *common.Context) (interface{}, error)
- func (api *API) GetAppByConfig(c *common.Context) (interface{}, error)
- func (api *API) GetAppByNode(c *common.Context) (interface{}, error)
- func (api *API) GetAppByRegistry(c *common.Context) (interface{}, error)
- func (api *API) GetAppBySecret(c *common.Context) (interface{}, error)
- func (api *API) GetApplication(c *common.Context) (interface{}, error)
- func (api *API) GetCertificate(c *common.Context) (interface{}, error)
- func (api *API) GetConfig(c *common.Context) (interface{}, error)
- func (api *API) GetNamespace(c *common.Context) (interface{}, error)
- func (api *API) GetNode(c *common.Context) (interface{}, error)
- func (api *API) GetNodeDeployHistory(c *common.Context) (interface{}, error)
- func (api *API) GetNodeProperties(c *common.Context) (interface{}, error)
- func (api *API) GetNodeStats(c *common.Context) (interface{}, error)
- func (api *API) GetNodes(c *common.Context) (interface{}, error)
- func (api *API) GetProperty(c *common.Context) (interface{}, error)
- func (api *API) GetQuota(c *common.Context) (interface{}, error)
- func (api *API) GetQuotaForMis(c *common.Context) (interface{}, error)
- func (api *API) GetRegistry(c *common.Context) (interface{}, error)
- func (api *API) GetSecret(c *common.Context) (interface{}, error)
- func (api *API) ImportFunction(c *common.Context) (interface{}, error)
- func (api *API) InitQuotas(namespace string) error
- func (api *API) ListApplication(c *common.Context) (interface{}, error)
- func (api *API) ListBucketObjects(c *common.Context) (interface{}, error)
- func (api *API) ListBucketObjectsV2(c *common.Context) (interface{}, error)
- func (api *API) ListBuckets(c *common.Context) (interface{}, error)
- func (api *API) ListBucketsV2(c *common.Context) (interface{}, error)
- func (api *API) ListCertificate(c *common.Context) (interface{}, error)
- func (api *API) ListConfig(c *common.Context) (interface{}, error)
- func (api *API) ListFunctionSources(c *common.Context) (interface{}, error)
- func (api *API) ListFunctionVersions(c *common.Context) (interface{}, error)
- func (api *API) ListFunctions(c *common.Context) (interface{}, error)
- func (api *API) ListNode(c *common.Context) (interface{}, error)
- func (api *API) ListObjectSources(c *common.Context) (interface{}, error)
- func (api *API) ListObjectSourcesV2(c *common.Context) (interface{}, error)
- func (api *API) ListProperty(c *common.Context) (interface{}, error)
- func (api *API) ListRegistry(c *common.Context) (interface{}, error)
- func (api *API) ListSecret(c *common.Context) (interface{}, error)
- func (api *API) NodeNumberCollector(namespace string) (map[string]int, error)
- func (api *API) ParseAndCheckNode(c *common.Context) (*v1.Node, error)
- func (api *API) ParseAndCheckNodeMode(c *common.Context) (*models.NodeMode, error)
- func (api *API) ParseAndCheckNodeNames(c *common.Context) (*models.NodeNames, error)
- func (api *API) ParseAndCheckProperties(c *common.Context) (*models.NodeProperties, error)
- func (api *API) RefreshRegistryPassword(c *common.Context) (interface{}, error)
- func (api *API) ReleaseQuota(namespace, quotaName string, number int) error
- func (api *API) ToApplication(appView *models.ApplicationView, oldApp *specV1.Application) (*specV1.Application, []specV1.Configuration, error)
- func (api *API) ToApplicationView(app *specV1.Application) (*models.ApplicationView, error)
- func (api *API) ToConfiguration(userID string, configView *models.ConfigurationView) (*specV1.Configuration, error)
- func (api *API) ToConfigurationView(config *specV1.Configuration) (*models.ConfigurationView, error)
- func (api *API) ToSecretView(s *specV1.Secret) (*models.SecretView, error)
- func (api *API) ToSecretViewList(s *models.SecretList) (*models.SecretViewList, error)
- func (api *API) UpdateApplication(c *common.Context) (interface{}, error)
- func (api *API) UpdateCertificate(c *common.Context) (interface{}, error)
- func (api *API) UpdateConfig(c *common.Context) (interface{}, error)
- func (api *API) UpdateNode(c *common.Context) (interface{}, error)
- func (api *API) UpdateNodeAndAppIndex(namespace string, app *specV1.Application) error
- func (api *API) UpdateNodeMode(c *common.Context) (interface{}, error)
- func (api *API) UpdateNodeProperties(c *common.Context) (interface{}, error)
- func (api *API) UpdateProperty(c *common.Context) (interface{}, error)
- func (api *API) UpdateQuota(c *common.Context) (interface{}, error)
- func (api *API) UpdateRegistry(c *common.Context) (interface{}, error)
- func (api *API) UpdateSecret(c *common.Context) (interface{}, error)
- type InitAPI
- type SyncAPI
- type SyncAPIImpl
Constants ¶
const ( ConfigDir = "/etc/baetyl" ProgramConfigDir = "/var/lib/baetyl/bin" FunctionConfigPrefix = "baetyl-function-config" FunctionProgramConfigPrefix = "baetyl-function-program-config" FunctionCodePrefix = "baetyl-function-code" FunctionDefaultConfigFile = "conf.yml" )
const ( ConfigTypeKV = "kv" ConfigTypeObject = "object" ConfigTypeFunction = "function" ConfigObjectTypeHttp = "http" )
const ( OfflineDuration = 40 * time.Second NodeNumber = 1 )
const ( CurrentAccount = "current" OtherAccount = "other" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
NS service.NamespaceService
Node service.NodeService
Index service.IndexService
Func service.FunctionService
Obj service.ObjectService
PKI service.PKIService
Auth service.AuthService
Prop service.PropertyService
Init service.InitService
License service.LicenseService
Template service.TemplateService
*service.AppCombinedService
}
API baetyl api server
func (*API) CreateApplication ¶
CreateApplication create one application
func (*API) CreateCertificate ¶
CreateCertificate create one Certificate
func (*API) CreateConfig ¶
CreateConfig create one config
func (*API) CreateNamespace ¶
CreateNamespace create one namespace
func (*API) CreateNode ¶
CreateNode create one node
func (*API) CreateQuota ¶ added in v2.1.1
CreateQuota for mis server api
- param namespace
- param quotaName
- param quota
func (*API) CreateQuotas ¶ added in v2.1.1
func (*API) CreateRegistry ¶
CreateRegistry create one Registry
func (*API) CreateSecret ¶
CreateSecret create one secret
func (*API) DeleteApplication ¶
DeleteApplication delete the application
func (*API) DeleteCertificate ¶
DeleteCertificate delete the Certificate
func (*API) DeleteConfig ¶
DeleteConfig delete the config
func (*API) DeleteNamespace ¶
func (*API) DeleteNode ¶
DeleteNode delete the node
func (*API) DeleteNodeAndAppIndex ¶
func (api *API) DeleteNodeAndAppIndex(namespace string, app *specV1.Application) error
func (*API) DeleteQuota ¶ added in v2.1.1
DeleteQuota for mis server api
- param namespace
- param quotaName
func (*API) DeleteRegistry ¶
DeleteRegistry delete the Registry
func (*API) DeleteSecret ¶
DeleteSecret delete the secret
func (*API) GenInitCmdFromNode ¶
GenInitCmdFromNode generate install command
func (*API) GetAppByCertificate ¶
GetAppByCertificate list app
func (*API) GetAppByNode ¶
GetAppByNode list app
func (*API) GetAppByRegistry ¶
GetAppByRegistry list app
func (*API) GetAppBySecret ¶
GetAppBySecret list app
func (*API) GetApplication ¶
GetApplication get a application
func (*API) GetCertificate ¶
GetCertificate get a Certificate
func (*API) GetNamespace ¶
GetNamespace get one namespace
func (*API) GetNodeDeployHistory ¶
GetNodeDeployHistory list node // TODO will support later
func (*API) GetNodeProperties ¶ added in v2.1.1
func (*API) GetNodeStats ¶
GetNodeStats get a node stats
func (*API) GetRegistry ¶
GetRegistry get a Registry
func (*API) ImportFunction ¶
ImportFunction ImportFunction
func (*API) ListApplication ¶
ListApplication list application
func (*API) ListBucketObjects ¶
Deprecated ListBucketObjects ListBucketObjects
func (*API) ListBucketObjectsV2 ¶
ListBucketObjectsV2 ListBucketObjectsV2
func (*API) ListBuckets ¶
Deprecated ListBuckets ListBuckets
func (*API) ListBucketsV2 ¶
ListBucketsV2 ListBucketsV2
func (*API) ListCertificate ¶
ListCertificate list Certificate
func (*API) ListConfig ¶
ListConfig list config
func (*API) ListFunctionSources ¶
ListFunctionSources ListFunctionSources
func (*API) ListFunctionVersions ¶
ListFunctionVersions list versions of a function
func (*API) ListFunctions ¶
ListFunctions list functions
func (*API) ListObjectSources ¶
Deprecated ListObjectSources ListObjectSources
func (*API) ListObjectSourcesV2 ¶
ListObjectSourcesV2 ListObjectSourcesV2
func (*API) ListRegistry ¶
ListRegistry list Registry
func (*API) ListSecret ¶
ListSecret list secret
func (*API) NodeNumberCollector ¶
func (*API) ParseAndCheckNode ¶
func (*API) ParseAndCheckNodeMode ¶ added in v2.1.1
func (*API) ParseAndCheckNodeNames ¶
func (*API) ParseAndCheckProperties ¶ added in v2.1.1
func (*API) RefreshRegistryPassword ¶
func (*API) ReleaseQuota ¶ added in v2.1.1
func (*API) ToApplication ¶ added in v2.1.1
func (api *API) ToApplication(appView *models.ApplicationView, oldApp *specV1.Application) (*specV1.Application, []specV1.Configuration, error)
func (*API) ToApplicationView ¶ added in v2.1.1
func (api *API) ToApplicationView(app *specV1.Application) (*models.ApplicationView, error)
func (*API) ToConfiguration ¶ added in v2.1.1
func (api *API) ToConfiguration(userID string, configView *models.ConfigurationView) (*specV1.Configuration, error)
func (*API) ToConfigurationView ¶ added in v2.1.1
func (api *API) ToConfigurationView(config *specV1.Configuration) (*models.ConfigurationView, error)
func (*API) ToSecretView ¶ added in v2.1.1
func (*API) ToSecretViewList ¶ added in v2.1.1
func (api *API) ToSecretViewList(s *models.SecretList) (*models.SecretViewList, error)
func (*API) UpdateApplication ¶
UpdateApplication update the application
func (*API) UpdateCertificate ¶
UpdateCertificate update the Certificate
func (*API) UpdateConfig ¶
UpdateConfig update the config
func (*API) UpdateNode ¶
UpdateNode update the node
func (*API) UpdateNodeAndAppIndex ¶
func (api *API) UpdateNodeAndAppIndex(namespace string, app *specV1.Application) error
func (*API) UpdateNodeMode ¶ added in v2.1.1
func (*API) UpdateNodeProperties ¶ added in v2.1.1
func (*API) UpdateQuota ¶ added in v2.1.1
UpdateQuota for mis server api
- param namespace
- param quotaName
- param quota
func (*API) UpdateRegistry ¶
UpdateRegistry update the Registry
type InitAPI ¶
type InitAPI struct {
Init service.InitService
Auth service.AuthService
}
func NewInitAPI ¶
func NewInitAPI(cfg *config.CloudConfig) (*InitAPI, error)
type SyncAPI ¶
type SyncAPI interface {
Report(msg specV1.Message) (*specV1.Message, error)
Desire(msg specV1.Message) (*specV1.Message, error)
}
func NewSyncAPI ¶
func NewSyncAPI(cfg *config.CloudConfig) (SyncAPI, error)
type SyncAPIImpl ¶
type SyncAPIImpl struct {
Sync service.SyncService
}