endpoints

package
v1.0.0-rc Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: AGPL-3.0 Imports: 66 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageType      = "image"
	ProductType    = "product"
	AddonType      = "addon"
	MysqlAddonName = "mysql-edge"
)
View Source
const (
	DefaultPageSize = 20
	DefaultPageNo   = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

type Endpoints struct {
	Mns          *mns.Mns
	Ess          *ess.Ess
	CloudAccount *cloud_account.CloudAccount
	Addons       *addons.Addons
	JS           jsonstore.JsonStore
	CachedJS     jsonstore.JsonStore
	// contains filtered or unexported fields
}

func New

func New(db *dbclient.DBClient, js jsonstore.JsonStore, cachedJS jsonstore.JsonStore, options ...Option) *Endpoints

func (*Endpoints) AddCloudClusters

func (e *Endpoints) AddCloudClusters(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) AddCloudNodes

func (e *Endpoints) AddCloudNodes(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) AddNodes

func (e *Endpoints) AddNodes(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) AddonScale

func (e *Endpoints) AddonScale(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

Addon Scale

func (*Endpoints) AutoRenewECS

func (e *Endpoints) AutoRenewECS(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) BatchUpgradeEdgeCluster

func (e *Endpoints) BatchUpgradeEdgeCluster(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) CetOnsDetailInfo

func (e *Endpoints) CetOnsDetailInfo(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) CetRedisDetailInfo

func (e *Endpoints) CetRedisDetailInfo(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) CloudResourceOverview

func (e *Endpoints) CloudResourceOverview(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) CloudResourceSetTag

func (e *Endpoints) CloudResourceSetTag(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

only set/unset/filter tag with dice-cluster or dice-project prefix

func (*Endpoints) ClusterInfo

func (e *Endpoints) ClusterInfo(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) ClusterPreview

func (e *Endpoints) ClusterPreview(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) ClusterUpdate

func (e *Endpoints) ClusterUpdate(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) CreateAccount

func (e *Endpoints) CreateAccount(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) CreateAddonCheck

func (e *Endpoints) CreateAddonCheck(req apistructs.CreateCloudResourceBaseInfo) error

func (*Endpoints) CreateEdgeApp

func (e *Endpoints) CreateEdgeApp(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

CreateEdgeApp Create Edge application

func (*Endpoints) CreateEdgeConfigSet

func (e *Endpoints) CreateEdgeConfigSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

CreateEdgeConfigSet Create edge configSet

func (*Endpoints) CreateEdgeConfigSetItem

func (e *Endpoints) CreateEdgeConfigSetItem(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

CreateEdgeConfigSet Create edge configSet

func (*Endpoints) CreateEdgeSite

func (e *Endpoints) CreateEdgeSite(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

CreateEdgeSite Create edge site

func (*Endpoints) CreateGatewayVpcGrant

func (e *Endpoints) CreateGatewayVpcGrant(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) CreateMysqlAccount

func (e *Endpoints) CreateMysqlAccount(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) CreateMysqlDatabase

func (e *Endpoints) CreateMysqlDatabase(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) CreateMysqlInstance

func (e *Endpoints) CreateMysqlInstance(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) CreateOSS

func (e *Endpoints) CreateOSS(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) CreateOnsGroup

func (e *Endpoints) CreateOnsGroup(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) CreateOnsInstance

func (e *Endpoints) CreateOnsInstance(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) CreateOnsTopic

func (e *Endpoints) CreateOnsTopic(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) CreateRedis

func (e *Endpoints) CreateRedis(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) CreateVPC

func (e *Endpoints) CreateVPC(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) CreateVSW

func (e *Endpoints) CreateVSW(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) DeleteAccount

func (e *Endpoints) DeleteAccount(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) DeleteEdgeApp

func (e *Endpoints) DeleteEdgeApp(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

DeleteEdgeApp Delete Edge application

func (*Endpoints) DeleteEdgeConfigSet

func (e *Endpoints) DeleteEdgeConfigSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

DeleteEdgeConfigSet Delete edge configSet

func (*Endpoints) DeleteEdgeConfigSetItem

func (e *Endpoints) DeleteEdgeConfigSetItem(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

DeleteEdgeConfigSetItem Delete edge configSet

func (*Endpoints) DeleteEdgeSite

func (e *Endpoints) DeleteEdgeSite(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

DeleteEdgeSite Delete edge site

func (*Endpoints) DeleteGateway

func (e *Endpoints) DeleteGateway(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) DeleteMysql

func (e *Endpoints) DeleteMysql(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) DeleteMysqlDatabase

func (e *Endpoints) DeleteMysqlDatabase(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) DeleteOSSResource

func (e *Endpoints) DeleteOSSResource(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

TODO demo delete

func (*Endpoints) DeleteOns

func (e *Endpoints) DeleteOns(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

TODO, now support process create addon failed but related cloud resource create successfully

func (*Endpoints) DeleteOnsTopic

func (e *Endpoints) DeleteOnsTopic(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) DeleteRedisResource

func (e *Endpoints) DeleteRedisResource(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) DoRemoteAction

func (e *Endpoints) DoRemoteAction(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error

func (*Endpoints) ECSTrending

func (e *Endpoints) ECSTrending(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) EdgeOrgPermCheck

func (e *Endpoints) EdgeOrgPermCheck(userID, orgID, action string) error

func (*Endpoints) EdgePermissionCheck

func (e *Endpoints) EdgePermissionCheck(userID, orgID, projectID, action string) error

Edge Permission check

func (*Endpoints) GetAddonConfig

func (e *Endpoints) GetAddonConfig(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

Get Addon config

func (*Endpoints) GetAddonStatus

func (e *Endpoints) GetAddonStatus(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

Get Addon status

func (*Endpoints) GetCloudAccount

func (e *Endpoints) GetCloudAccount(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

GetCloudAccount Get cloud account

func (*Endpoints) GetEdgeApp

func (e *Endpoints) GetEdgeApp(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

ListEdgeApp List Edge application

func (*Endpoints) GetEdgeAppStatus

func (e *Endpoints) GetEdgeAppStatus(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

GetEdgeAppStatus Get Edge application status

func (*Endpoints) GetEdgeConfigSet

func (e *Endpoints) GetEdgeConfigSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

GetEdgeConfigSet Get edge configSet

func (*Endpoints) GetEdgeConfigSetItem

func (e *Endpoints) GetEdgeConfigSetItem(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

GetEdgeConfigSetItem Get edge configSet

func (*Endpoints) GetEdgeSite

func (e *Endpoints) GetEdgeSite(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) GetIdentity

func (*Endpoints) GetInitEdgeSiteShell

func (e *Endpoints) GetInitEdgeSiteShell(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

GetInitEdgeSiteShell Get edge site init shell

func (*Endpoints) GetMysqlDetailInfo

func (e *Endpoints) GetMysqlDetailInfo(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) GetScriptInfo

func (e *Endpoints) GetScriptInfo(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

GetScriptInfo Get script info

func (*Endpoints) GetVpcInfoByCluster

func (e *Endpoints) GetVpcInfoByCluster(ak_ctx aliyun_resources.Context, r *http.Request,
	cluster string) (libvpc.Vpc, httpserver.Responser)

func (*Endpoints) GrantMysqlAccountPrivilege

func (e *Endpoints) GrantMysqlAccountPrivilege(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) Info

func (e *Endpoints) Info(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

Info demo

func (*Endpoints) InitRecord

Create cloud resource

func (*Endpoints) IsManager

func (e *Endpoints) IsManager(userID string, scopeType apistructs.ScopeType, scopeID string) error

func (*Endpoints) ListAccount

func (e *Endpoints) ListAccount(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) ListAliyunResources

func (e *Endpoints) ListAliyunResources(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) ListECS

func (e *Endpoints) ListECS(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) ListEdgeApp

func (e *Endpoints) ListEdgeApp(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

ListEdgeApp List Edge application

func (*Endpoints) ListEdgeConfigSet

func (e *Endpoints) ListEdgeConfigSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

ListEdgeConfigSet List edge configSet

func (*Endpoints) ListEdgeConfigSetItem

func (e *Endpoints) ListEdgeConfigSetItem(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

ListEdgeConfigSetItem List edge configSet item

func (*Endpoints) ListEdgeSite

func (e *Endpoints) ListEdgeSite(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

ListEdgeSite List edge site

func (*Endpoints) ListGatewayAndVpc

func (e *Endpoints) ListGatewayAndVpc(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListLabels

func (e *Endpoints) ListLabels(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) ListMysql

func (e *Endpoints) ListMysql(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListMysqlAccount

func (e *Endpoints) ListMysqlAccount(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListMysqlDatabase

func (e *Endpoints) ListMysqlDatabase(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListOSS

func (e *Endpoints) ListOSS(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListOns

func (e *Endpoints) ListOns(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListOnsGroup

func (e *Endpoints) ListOnsGroup(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListOnsTopic

func (e *Endpoints) ListOnsTopic(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListRedis

func (e *Endpoints) ListRedis(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListRegion

func (e *Endpoints) ListRegion(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) ListVPC

func (e *Endpoints) ListVPC(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListVSW

func (e *Endpoints) ListVSW(ctx context.Context, r *http.Request, vars map[string]string) (
	resp httpserver.Responser, err error)

func (*Endpoints) ListZone

func (e *Endpoints) ListZone(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) LockCluster

func (e *Endpoints) LockCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

lock cluster for auto scale

func (*Endpoints) Logs

func (e *Endpoints) Logs(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) OfflineAppSite

func (e *Endpoints) OfflineAppSite(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

OfflineAppSite Offline site which deploy specified application

func (*Endpoints) OfflineEdgeCluster

func (e *Endpoints) OfflineEdgeCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) OfflineEdgeHost

func (e *Endpoints) OfflineEdgeHost(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

OfflineEdgeHost Offline edge host

func (*Endpoints) OrgClusterInfo

func (e *Endpoints) OrgClusterInfo(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) OrgPermCheck

func (e *Endpoints) OrgPermCheck(userID, orgID, action string) error

func (*Endpoints) PermissionCheck

func (e *Endpoints) PermissionCheck(userID, orgID, projectID, action string) error

Permission check

func (*Endpoints) Query

func (e *Endpoints) Query(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) QueryCloudResourceDetail

func (e *Endpoints) QueryCloudResourceDetail(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) RecordTypeList

func (e *Endpoints) RecordTypeList(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) RegistryReadonly

func (e *Endpoints) RegistryReadonly(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) RegistryRemoveLayers

func (e *Endpoints) RegistryRemoveLayers(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) RegistryRemoveManifests

func (e *Endpoints) RegistryRemoveManifests(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) ResetMysqlAccountPassword

func (e *Endpoints) ResetMysqlAccountPassword(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) RestartAppSite

func (e *Endpoints) RestartAppSite(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

RestartAppSite Restart site which deploy specified application

func (*Endpoints) RestartECS

func (e *Endpoints) RestartECS(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) RmNodes

func (e *Endpoints) RmNodes(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) Routes

func (e *Endpoints) Routes() []httpserver.Endpoint

Routes Return routes

func (*Endpoints) ServeScript

func (e *Endpoints) ServeScript(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error

ServeScript Offer script download.

func (*Endpoints) StartECS

func (e *Endpoints) StartECS(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) StopECS

func (e *Endpoints) StopECS(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

func (*Endpoints) TagResources

func (e *Endpoints) TagResources(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) UnlockCluster

func (e *Endpoints) UnlockCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

unlock cluster for auto scale

func (*Endpoints) UpdateAddonConfig

func (e *Endpoints) UpdateAddonConfig(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

Update addon config

func (*Endpoints) UpdateEdgeApp

func (e *Endpoints) UpdateEdgeApp(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

UpdateEdgeApp Update Edge application

func (*Endpoints) UpdateEdgeConfigSet

func (e *Endpoints) UpdateEdgeConfigSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

UpdateEdgeConfigSet Update edge configSet

func (*Endpoints) UpdateEdgeConfigSetItem

func (e *Endpoints) UpdateEdgeConfigSetItem(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

UpdateEdgeConfigSetItem Update edge configSet

func (*Endpoints) UpdateEdgeSite

func (e *Endpoints) UpdateEdgeSite(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

UpdateEdgeSite Update edge site

func (*Endpoints) UpdateLabels

func (e *Endpoints) UpdateLabels(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) UpgradeEdgeCluster

func (e *Endpoints) UpgradeEdgeCluster(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) VPCTagCluster

func (e *Endpoints) VPCTagCluster(ctx context.Context, r *http.Request, vars map[string]string) (
	httpserver.Responser, error)

type Option

type Option func(*Endpoints)

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle With bundle

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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