consts

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Argus
	API_PATH_ARGUS                    = "/argus-service/v1/projects/%s"
	API_PATH_ARGUS_CREDENTIALS        = API_PATH_ARGUS_WITH_INSTANCE_ID + "/credentials"
	API_PATH_ARGUS_INSTANCES          = API_PATH_ARGUS + "/instances"
	API_PATH_ARGUS_WITH_INSTANCE_ID   = API_PATH_ARGUS_INSTANCES + "/%s"
	API_PATH_ARGUS_GRAFANA_CONFIGS    = API_PATH_ARGUS_WITH_INSTANCE_ID + "/grafana-configs"
	API_PATH_ARGUS_JOBS               = API_PATH_ARGUS_WITH_INSTANCE_ID + "/scrapeconfigs"
	API_PATH_ARGUS_JOBS_WITH_JOB_NAME = API_PATH_ARGUS_JOBS + "/%s"
	API_PATH_ARGUS_METRICS_RETENTION  = API_PATH_ARGUS_WITH_INSTANCE_ID + "/metrics-storage-retentions"
	API_PATH_ARGUS_PLANS              = API_PATH_ARGUS + "/plans"
	API_PATH_ARGUS_TRACES             = API_PATH_ARGUS_WITH_INSTANCE_ID + "/traces-configs"

	// Costs
	API_PATH_COSTS                     = "/costs-service/v1/costs/%s"
	API_PATH_COSTS_WITH_PARAMS         = API_PATH_COSTS + "?from=%s&to=%s&granularity=%v&depth=%v"
	API_PATH_COSTS_PROJECT             = "/costs-service/v1/costs/%s/projects/%s"
	API_PATH_COSTS_PROJECT_WITH_PARAMS = API_PATH_COSTS_PROJECT + "?from=%s&to=%s&granularity=%v&depth=%v"

	// Kubernetes
	API_PATH_SKE                 = "/ske/v1"
	API_PATH_SKE_PROJECTS        = API_PATH_SKE + "/projects/%s"
	API_PATH_SKE_CLUSTERS        = API_PATH_SKE_PROJECTS + "/clusters"
	API_PATH_SKE_WITH_CLUSTER_ID = API_PATH_SKE_CLUSTERS + "/%s"
	API_PATH_SKE_OPTIONS         = API_PATH_SKE + "/provider-options"

	// Object Storage
	API_PATH_OBJECT_STORAGE                         = "/object-storage-api/v1"
	API_PATH_OBJECT_STORAGE_PROJECT                 = API_PATH_OBJECT_STORAGE + "/project/%s"
	API_PATH_OBJECT_STORAGE_PROJECT_FORCE_DELETE    = API_PATH_OBJECT_STORAGE + "/project-force-delete/%s"
	API_PATH_OBJECT_STORAGE_KEYS                    = API_PATH_OBJECT_STORAGE_PROJECT + "/access-keys"
	API_PATH_OBJECT_STORAGE_KEYS_WITH_PARAMS        = API_PATH_OBJECT_STORAGE_KEYS + "?credentials-group=%s"
	API_PATH_OBJECT_STORAGE_KEY                     = API_PATH_OBJECT_STORAGE_PROJECT + "/access-key"
	API_PATH_OBJECT_STORAGE_KEY_WITH_PARAMS         = API_PATH_OBJECT_STORAGE_KEY + "?credentials-group=%s"
	API_PATH_OBJECT_STORAGE_WITH_KEY_ID             = API_PATH_OBJECT_STORAGE_PROJECT + "/access-key/%s"
	API_PATH_OBJECT_STORAGE_WITH_KEY_ID_WITH_PARAMS = API_PATH_OBJECT_STORAGE_WITH_KEY_ID + "?credentials-group=%s"
	API_PATH_OBJECT_STORAGE_BUCKETS                 = API_PATH_OBJECT_STORAGE_PROJECT + "/buckets"
	API_PATH_OBJECT_STORAGE_BUCKET                  = API_PATH_OBJECT_STORAGE_PROJECT + "/bucket/%s"
	API_PATH_OBJECT_STORAGE_CREDENTIALS_CREATE      = API_PATH_OBJECT_STORAGE_PROJECT + "/credentials-group"
	API_PATH_OBJECT_STORAGE_CREDENTIALS_LIST        = API_PATH_OBJECT_STORAGE_PROJECT + "/credentials-groups"
	API_PATH_OBJECT_STORAGE_CREDENTIALS_DELETE      = API_PATH_OBJECT_STORAGE_PROJECT + "/credentials-group/%s"

	// Membership
	API_PATH_MEMBERSHIP                                   = "/membership/v1/projects/%s"
	API_PATH_MEMBERSHIP_ORG_PROJECT                       = "/membership/v1/organizations/%s/projects/%s"
	API_PATH_MEMBERSHIP_ROLES                             = API_PATH_MEMBERSHIP + "/roles"
	API_PATH_MEMBERSHIP_ROLE                              = API_PATH_MEMBERSHIP + "/roles/%s"
	API_PATH_MEMBERSHIP_ROLE_SERVICE_ACCOUNTS             = API_PATH_MEMBERSHIP_ROLE + "/service-accounts"
	API_PATH_MEMBERSHIP_ORG_PROJECT_ROLE_SERVICE_ACCOUNTS = API_PATH_MEMBERSHIP_ORG_PROJECT + "/roles/%s/service-accounts"
	API_PATH_MEMBERSHIP_ORG_PROJECT_ROLE_SERVICE_ACCOUNT  = API_PATH_MEMBERSHIP_ORG_PROJECT + "/roles/%s/service-accounts/%s"
	API_PATH_MEMBERSHIP_ROLES_DELETE                      = API_PATH_MEMBERSHIP + "/roles/delete"

	// Membership v2
	API_PATH_MEMBERSHIP_V2                            = "/membership/v2"
	API_PATH_MEMBERSHIP_V2_WITH_RESOURCE_ID           = API_PATH_MEMBERSHIP_V2 + "/%s"
	API_PATH_MEMBERSHIP_V2_WITH_RESOURCE_TYPE         = API_PATH_MEMBERSHIP_V2_WITH_RESOURCE_ID + "/%s"
	API_PATH_MEMBERSHIP_V2_MEMBERS                    = API_PATH_MEMBERSHIP_V2_WITH_RESOURCE_ID + "/members"
	API_PATH_MEMBERSHIP_V2_WITH_RESOURCE_TYPE_MEMBERS = API_PATH_MEMBERSHIP_V2_WITH_RESOURCE_TYPE + "/members"
	API_PATH_MEMBERSHIP_V2_REMOVE                     = API_PATH_MEMBERSHIP_V2_MEMBERS + "/remove"
	API_PATH_MEMBERSHIP_V2_VALIDATE                   = API_PATH_MEMBERSHIP_V2_MEMBERS + "/validate"
	API_PATH_MEMBERSHIP_V2_PERMISSIONS                = API_PATH_MEMBERSHIP_V2 + "/permissions"
	API_PATH_MEMBERSHIP_V2_USER_PERMISSIONS           = API_PATH_MEMBERSHIP_V2 + "/users/%s/permissions"
	API_PATH_MEMBERSHIP_V2_ROLES                      = API_PATH_MEMBERSHIP_V2_WITH_RESOURCE_ID + "/roles"
	API_PATH_MEMBERSHIP_V2_ROLES_WITH_RESOURCE_TYPE   = API_PATH_MEMBERSHIP_V2_WITH_RESOURCE_TYPE + "/roles"

	// Resource Management
	API_PATH_RESOURCE_MANAGEMENT              = "/resource-management/v1"
	API_PATH_RESOURCE_MANAGEMENT_PROJECTS     = API_PATH_RESOURCE_MANAGEMENT + "/projects/%s"
	API_PATH_RESOURCE_MANAGEMENT_ORG_PROJECTS = API_PATH_RESOURCE_MANAGEMENT + "/organizations/%s/projects"
	API_PATH_RESOURCE_MANAGEMENT_ORG_PROJECT  = API_PATH_RESOURCE_MANAGEMENT_ORG_PROJECTS + "/%s"

	// Resource Manager v2
	API_PATH_RESOURCE_MANAGER_V2          = "/resource-manager/v2"
	API_PATH_RESOURCE_MANAGER_V2_PROJECTS = API_PATH_RESOURCE_MANAGER_V2 + "/projects"
	API_PATH_RESOURCE_MANAGER_V2_PROJECT  = API_PATH_RESOURCE_MANAGER_V2_PROJECTS + "/%s"
	API_PATH_RESOURCE_MANAGER_V2_ORG      = API_PATH_RESOURCE_MANAGER_V2 + "/organizations/%s"

	// Shadow Users
	API_PATH_SHADOW_USERS = "/ucp-shadow-user-management/v1/createcuaashadowuser/user"
)

constants defining API paths

View Source
const (
	DEFAULT_AUTH_BASE_URL = "https://auth.01.idp.eu01.stackit.cloud/"
	DEFAULT_BASE_URL      = "https://api.stackit.cloud/"

	// schwarz specific constants
	SCHWARZ_ORGANIZATION_ID = "07a1ed91-2efb-42c2-9d00-e84ae71bce0d"
	SCHWARZ_AUTH_ORIGIN     = "schwarz-federation"

	// resource types
	RESOURCE_TYPE_PROJECT = "project"
	RESOURCE_TYPE_ORG     = "organization"

	// Member Roles
	ROLE_PROJECT_OWNER   = "project.owner"
	ROLE_PROJECT_MEMBER  = "project.member"
	ROLE_PROJECT_ADMIN   = "project.admin"
	ROLE_PROJECT_AUDITOR = "project.auditor"

	// Project scopes
	PROJECT_SCOPE_PUBLIC  = "PUBLIC"
	PROJECT_SCOPE_PRIVATE = "PRIVATE"

	// Project lifecycle statuses
	PROJECT_STATUS_ACTIVE        = "ACTIVE"
	PROJECT_STATUS_CREATING      = "CREATING"
	PROJECT_STATUS_DELETING      = "DELETING"
	PROJECT_STATUS_NOT_SPECIFIED = "NOT_SPECIFIED"

	// SKE
	SKE_CLUSTERS_TAINT_EFFECT_NO_SCHED      = "NoSchedule"
	SKE_CLUSTERS_TAINT_EFFECT_PREF_NO_SCHED = "PreferNoSchedule"
	SKE_CLUSTERS_TAINT_EFFECT_NO_EXEC       = "NoExecute"

	SKE_CLUSTERS_CRI_DOCKER     = "docker"
	SKE_CLUSTERS_CRI_CONTAINERD = "containerd"

	SKE_PROJECT_STATUS_UNSPECIFIED = "STATE_UNSPECIFIED"
	SKE_PROJECT_STATUS_CREATING    = "STATE_CREATING"
	SKE_PROJECT_STATUS_CREATED     = "STATE_CREATED"
	SKE_PROJECT_STATUS_DELETING    = "STATE_DELETING"
	SKE_PROJECT_STATUS_FAILED      = "STATE_FAILED"

	SKE_CLUSTER_STATUS_CREATING    = "STATE_CREATING"
	SKE_CLUSTER_STATUS_DELETING    = "STATE_DELETING"
	SKE_CLUSTER_STATUS_HEALTHY     = "STATE_HEALTHY"
	SKE_CLUSTER_STATUS_HIBERNATED  = "STATE_HIBERNATED"
	SKE_CLUSTER_STATUS_HIBERNATING = "STATE_HIBERNATING"
	SKE_CLUSTER_STATUS_RECONCILING = "STATE_RECONCILING"
	SKE_CLUSTER_STATUS_UNHEALTHY   = "STATE_UNHEALTHY"
	SKE_CLUSTER_STATUS_UNSPECIFIED = "STATE_UNSPECIFIED"
	SKE_CLUSTER_STATUS_WAKINGUP    = "STATE_WAKINGUP"

	SKE_VERSION_STATE_DEPRECATED = "deprecated"
	SKE_VERSION_STATE_SUPPORTED  = "supported"

	// granularity options; to be used for costs.GetProjectCosts()
	COSTS_GRANULARITY_NONE    = "none"
	COSTS_GRANULARITY_DAILY   = "daily"
	COSTS_GRANULARITY_WEEKLY  = "weekly"
	COSTS_GRANULARITY_MONTHLY = "monthly"
	COSTS_GRANULARITY_YEARLY  = "yearly"

	// depth options; to be used for costs.GetProjectCosts()
	COSTS_DEPTH_PROJECT = "project"
	COSTS_DEPTH_SERVICE = "service"
	COSTS_DEPTH_AUTO    = "auto"

	// Argus
	ARGUS_INSTANCE_STATUS_CREATING         = "CREATING"
	ARGUS_INSTANCE_STATUS_CREATE_SUCCEEDED = "CREATE_SUCCEEDED"
	ARGUS_INSTANCE_STATUS_CREATE_FAILED    = "CREATE_FAILED"
	ARGUS_INSTANCE_STATUS_DELETING         = "DELETING"
	ARGUS_INSTANCE_STATUS_DELETE_SUCCEEDED = "DELETE_SUCCEEDED"
	ARGUS_INSTANCE_STATUS_DELETE_FAILED    = "DELETE_FAILED"
	ARGUS_INSTANCE_STATUS_UPDATING         = "UPDATING"
	ARGUS_INSTANCE_STATUS_UPDATE_SUCCEEDED = "UPDATE_SUCCEEDED"
	ARGUS_INSTANCE_STATUS_UPDATE_FAILED    = "UPDATE_FAILED"
)

constants used across client services

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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