api

package
v0.0.0-...-823d357 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FeatureFlagSaveAROTestConfig is the feature in the subscription that is used
	// to indicate if we need to save ARO cluster config into the E2E
	// StorageAccount
	FeatureFlagSaveAROTestConfig = "Microsoft.RedHatOpenShift/SaveAROTestConfig"

	// FeatureFlagAdminKubeconfig is the feature in the subscription that is used
	// to enable adminKubeconfig api. API itself returns privileged kubeconfig.
	// We need a feature flag to make sure we don't open a security hole in existing
	// clusters before customer had a chance to patch their API RBAC
	FeatureFlagAdminKubeconfig = "Microsoft.RedHatOpenShift/AdminKubeconfig"
)

Variables

View Source
var (
	CloudErrorCodeInternalServerError                = "InternalServerError"
	CloudErrorCodeDeploymentFailed                   = "DeploymentFailed"
	CloudErrorCodeInvalidParameter                   = "InvalidParameter"
	CloudErrorCodeInvalidRequestContent              = "InvalidRequestContent"
	CloudErrorCodeInvalidResource                    = "InvalidResource"
	CloudErrorCodeDuplicateResourceGroup             = "DuplicateResourceGroup"
	CloudErrorCodeInvalidResourceNamespace           = "InvalidResourceNamespace"
	CloudErrorCodeInvalidResourceType                = "InvalidResourceType"
	CloudErrorCodeInvalidSubscriptionID              = "InvalidSubscriptionID"
	CloudErrorCodeMismatchingResourceID              = "MismatchingResourceID"
	CloudErrorCodeMismatchingResourceName            = "MismatchingResourceName"
	CloudErrorCodeMismatchingResourceType            = "MismatchingResourceType"
	CloudErrorCodePropertyChangeNotAllowed           = "PropertyChangeNotAllowed"
	CloudErrorCodeRequestNotAllowed                  = "RequestNotAllowed"
	CloudErrorCodeResourceGroupNotFound              = "ResourceGroupNotFound"
	CloudErrorCodeResourceNotFound                   = "ResourceNotFound"
	CloudErrorCodeUnsupportedMediaType               = "UnsupportedMediaType"
	CloudErrorCodeInvalidLinkedVNet                  = "InvalidLinkedVNet"
	CloudErrorCodeInvalidLinkedRouteTable            = "InvalidLinkedRouteTable"
	CloudErrorCodeNotFound                           = "NotFound"
	CloudErrorCodeForbidden                          = "Forbidden"
	CloudErrorCodeInvalidSubscriptionState           = "InvalidSubscriptionState"
	CloudErrorCodeInvalidServicePrincipalCredentials = "InvalidServicePrincipalCredentials"
	CloudErrorCodeInvalidServicePrincipalClaims      = "InvalidServicePrincipalClaims"
	CloudErrorCodeInvalidResourceProviderPermissions = "InvalidResourceProviderPermissions"
	CloudErrorCodeInvalidServicePrincipalPermissions = "InvalidServicePrincipalPermissions"
	CloudErrorCodeInvalidLocation                    = "InvalidLocation"
	CloudErrorCodeInvalidOperationID                 = "InvalidOperationID"
	CloudErrorCodeDuplicateClientID                  = "DuplicateClientID"
	CloudErrorCodeDuplicateDomain                    = "DuplicateDomain"
	CloudErrorCodeResourceQuotaExceeded              = "ResourceQuotaExceeded"
	CloudErrorCodeQuotaExceeded                      = "QuotaExceeded"
	CloudErrorResourceProviderNotRegistered          = "ResourceProviderNotRegistered"
)

CloudErrorCodes

View Source
var APIs = map[string]*Version{}

APIs is the map of registered API versions

Functions

func ExampleOperationListResponse

func ExampleOperationListResponse() interface{}

ExampleOperationListResponse returns an example OperationList object that the RP might return to an end-user

func WriteCloudError

func WriteCloudError(w http.ResponseWriter, err *CloudError)

WriteCloudError writes a CloudError to the given ResponseWriter

func WriteError

func WriteError(w http.ResponseWriter, statusCode int, code, target, message string, a ...interface{})

WriteError constructs and writes a CloudError to the given ResponseWriter

Types

type APIServerProfile

type APIServerProfile struct {
	MissingFields

	Visibility Visibility `json:"visibility,omitempty"`
	URL        string     `json:"url,omitempty"`
	IP         string     `json:"ip,omitempty"`
	IntIP      string     `json:"intIp,omitempty"`
}

APIServerProfile represents an API server profile

type AccountOwnerProfile

type AccountOwnerProfile struct {
	MissingFields

	Email string `json:"email,omitempty"`
}

AccountOwnerProfile represents the subscription account owner information

type ArchitectureVersion

type ArchitectureVersion int

ArchitectureVersion represents an architecture version

const (
	// ArchitectureVersionV1: 4.3, 4.4: 2 load balancers, 2 NSGs
	ArchitectureVersionV1 ArchitectureVersion = iota
	// ArchitectureVersionV2: 4.5: 1 load balancer, 1 NSG
	ArchitectureVersionV2
)

ArchitectureVersion constants

type AsyncOperation

type AsyncOperation struct {
	MissingFields

	ID   string `json:"id,omitempty" deep:"-"`
	Name string `json:"name,omitempty" deep:"-"`

	InitialProvisioningState ProvisioningState `json:"initialStatus,omitempty"`
	ProvisioningState        ProvisioningState `json:"status,omitempty"`

	StartTime time.Time  `json:"startTime,omitempty" deep:"-"`
	EndTime   *time.Time `json:"endTime,omitempty" deep:"-"`

	Error *CloudErrorBody `json:"error,omitempty"`
}

AsyncOperation represents an asyncOperation

type AsyncOperationDocument

type AsyncOperationDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty" deep:"-"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	AsyncOperation *AsyncOperation `json:"asyncOperation,omitempty"`

	OpenShiftClusterKey string            `json:"openShiftClusterKey,omitempty"`
	OpenShiftCluster    *OpenShiftCluster `json:"openShiftCluster,omitempty"`
}

AsyncOperationDocument represents a asyncOperation document. pkg/database/cosmosdb requires its definition.

func (*AsyncOperationDocument) String

func (c *AsyncOperationDocument) String() string

type AsyncOperationDocuments

type AsyncOperationDocuments struct {
	Count                   int                       `json:"_count,omitempty"`
	ResourceID              string                    `json:"_rid,omitempty"`
	AsyncOperationDocuments []*AsyncOperationDocument `json:"Documents,omitempty"`
}

AsyncOperationDocuments represents asyncOperation documents. pkg/database/cosmosdb requires its definition.

func (*AsyncOperationDocuments) String

func (c *AsyncOperationDocuments) String() string

type Billing

type Billing struct {
	MissingFields

	CreationTime    int `json:"creationTime,omitempty" deep:"-"`
	DeletionTime    int `json:"deletionTime,omitempty"`
	LastBillingTime int `json:"lastBillingTime,omitempty"`

	Location string `json:"location,omitempty"`
	TenantID string `json:"tenantID,omitempty"`
}

Billing represents a Billing entry

type BillingDocument

type BillingDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	Billing *Billing `json:"billing,omitempty"`

	Key                       string `json:"key,omitempty"`
	ClusterResourceGroupIDKey string `json:"clusterResourceGroupIDKey,omitempty"`
	InfraID                   string `json:"infraId,omitempty"`
}

BillingDocument represents a billing document. pkg/database/cosmosdb requires its definition.

func (*BillingDocument) String

func (c *BillingDocument) String() string

type BillingDocuments

type BillingDocuments struct {
	Count            int                `json:"_count,omitempty"`
	ResourceID       string             `json:"_rid,omitempty"`
	BillingDocuments []*BillingDocument `json:"Documents,omitempty"`
}

BillingDocuments represents billing documents. pkg/database/cosmosdb requires its definition.

func (*BillingDocuments) String

func (c *BillingDocuments) String() string

type CloudError

type CloudError struct {
	// The status code.
	StatusCode int `json:"-"`

	// An error response from the service.
	*CloudErrorBody `json:"error,omitempty"`
}

CloudError represents a cloud error.

func NewCloudError

func NewCloudError(statusCode int, code, target, message string, a ...interface{}) *CloudError

NewCloudError returns a new CloudError

func (*CloudError) Error

func (err *CloudError) Error() string

type CloudErrorBody

type CloudErrorBody struct {
	// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code string `json:"code,omitempty"`

	// A message describing the error, intended to be suitable for display in a user interface.
	Message string `json:"message,omitempty"`

	// The target of the particular error. For example, the name of the property in error.
	Target string `json:"target,omitempty"`

	//A list of additional details about the error.
	Details []CloudErrorBody `json:"details,omitempty"`
}

CloudErrorBody represents the body of a cloud error.

func (*CloudErrorBody) String

func (b *CloudErrorBody) String() string

type ClusterProfile

type ClusterProfile struct {
	MissingFields

	PullSecret      SecureString `json:"pullSecret,omitempty"`
	Domain          string       `json:"domain,omitempty"`
	Version         string       `json:"version,omitempty"`
	ResourceGroupID string       `json:"resourceGroupId,omitempty"`
}

ClusterProfile represents a cluster profile.

type ConsoleProfile

type ConsoleProfile struct {
	MissingFields

	URL string `json:"url,omitempty"`
}

ConsoleProfile represents a console profile.

type CorrelationData

type CorrelationData struct {
	// CorrelationID contains value of x-ms-correlation-request-id
	CorrelationID string `json:"correlationId,omitempty"`

	// ClientRequestID contains value of x-ms-client-request-id
	ClientRequestID string `json:"clientRequestId,omitempty"`

	// RequestID contains value of x-ms-request-id
	RequestID string `json:"requestID,omitempty"`

	// ClientPrincipalName contains value of x-ms-client-principal-name
	ClientPrincipalName string `json:"clientPrincipalName,omitempty"`

	// RequestTime is the time that the request was received
	RequestTime time.Time `json:"requestTime,omitempty"`
}

CorrelationData represents any data, used for metrics or tracing. More on these values: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-details.md

type CreatedByType

type CreatedByType string

CreatedByType by defines user type, which executed the request This field should match common-types field names for swagger and sdk generation

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

type Display

type Display struct {
	// Friendly name of the resource provider.
	Provider string `json:"provider,omitempty"`

	// Resource type on which the operation is performed.
	Resource string `json:"resource,omitempty"`

	// Operation type: read, write, delete, listKeys/action, etc.
	Operation string `json:"operation,omitempty"`

	// Friendly name of the operation.
	Description string `json:"description,omitempty"`
}

Display represents the display details of an operation.

type IngressProfile

type IngressProfile struct {
	MissingFields

	Name       string     `json:"name,omitempty"`
	Visibility Visibility `json:"visibility,omitempty"`
	IP         string     `json:"ip,omitempty"`
}

IngressProfile represents an ingress profile

type Install

type Install struct {
	MissingFields

	Now   time.Time    `json:"now,omitempty"`
	Phase InstallPhase `json:"phase"`
}

Install represents an install process

type InstallPhase

type InstallPhase int

InstallPhase represents an install phase

const (
	InstallPhaseBootstrap InstallPhase = iota
	InstallPhaseRemoveBootstrap
)

InstallPhase constants

func InstallPhaseString

func InstallPhaseString(s string) (InstallPhase, error)

InstallPhaseString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func InstallPhaseValues

func InstallPhaseValues() []InstallPhase

InstallPhaseValues returns all values of the enum

func (InstallPhase) IsAInstallPhase

func (i InstallPhase) IsAInstallPhase() bool

IsAInstallPhase returns "true" if the value is listed in the enum definition. "false" otherwise

func (InstallPhase) MarshalJSON

func (p InstallPhase) MarshalJSON() ([]byte, error)

MarshalJSON marshals an InstallPhase

func (InstallPhase) String

func (i InstallPhase) String() string

func (*InstallPhase) UnmarshalJSON

func (p *InstallPhase) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals an InstallPhase

type Kubeconfig

type Kubeconfig struct {
	MissingFields

	Elevated bool `json:"elevated,omitempty"`
}

type MasterProfile

type MasterProfile struct {
	MissingFields

	VMSize   VMSize `json:"vmSize,omitempty"`
	SubnetID string `json:"subnetId,omitempty"`
}

MasterProfile represents a master profile

type MissingFields

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

MissingFields retains values that do not map to struct fields during JSON marshalling/unmarshalling. MissingFields implements github.com/ugorji/go/codec.MissingFielder.

func (*MissingFields) CodecMissingField

func (mf *MissingFields) CodecMissingField(field []byte, value interface{}) bool

CodecMissingField is called to set a missing field and value pair

func (*MissingFields) CodecMissingFields

func (mf *MissingFields) CodecMissingFields() map[string]interface{}

CodecMissingFields returns the set of fields which are not struct fields

type Monitor

type Monitor struct {
	MissingFields

	Buckets []string `json:"buckets,omitempty"`
}

Monitor represents a monitor

type MonitorDocument

type MonitorDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	TTL         int                    `json:"ttl,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	LeaseOwner   string `json:"leaseOwner,omitempty"`
	LeaseExpires int    `json:"leaseExpires,omitempty"`

	Monitor *Monitor `json:"monitor,omitempty"`
}

MonitorDocument represents a monitor document. pkg/database/cosmosdb requires its definition.

type MonitorDocuments

type MonitorDocuments struct {
	Count            int                `json:"_count,omitempty"`
	ResourceID       string             `json:"_rid,omitempty"`
	MonitorDocuments []*MonitorDocument `json:"Documents,omitempty"`
}

MonitorDocuments represents monitor documents. pkg/database/cosmosdb requires its definition.

type NetworkProfile

type NetworkProfile struct {
	MissingFields

	PodCIDR     string `json:"podCidr,omitempty"`
	ServiceCIDR string `json:"serviceCidr,omitempty"`

	APIServerPrivateEndpointIP string `json:"privateEndpointIp,omitempty"`
}

NetworkProfile represents a network profile

type OpenShiftCluster

type OpenShiftCluster struct {
	MissingFields

	// ID, Name and Type are cased as the user provided them at create time.
	// ID, Name, Type and Location are immutable.
	ID         string                     `json:"id,omitempty"`
	Name       string                     `json:"name,omitempty"`
	Type       string                     `json:"type,omitempty"`
	Location   string                     `json:"location,omitempty"`
	SystemData SystemData                 `json:"systemData,omitempty"`
	Tags       map[string]string          `json:"tags,omitempty"`
	Properties OpenShiftClusterProperties `json:"properties,omitempty"`
}

OpenShiftCluster represents an OpenShift cluster

type OpenShiftClusterAdminKubeconfigConverter

type OpenShiftClusterAdminKubeconfigConverter interface {
	ToExternal(*OpenShiftCluster) interface{}
}

type OpenShiftClusterConverter

type OpenShiftClusterConverter interface {
	ToExternal(*OpenShiftCluster) interface{}
	ToExternalList([]*OpenShiftCluster, string) interface{}
	ToInternal(interface{}, *OpenShiftCluster)
}

type OpenShiftClusterCredentialsConverter

type OpenShiftClusterCredentialsConverter interface {
	ToExternal(*OpenShiftCluster) interface{}
}

type OpenShiftClusterDocument

type OpenShiftClusterDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty" deep:"-"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	Key                       string `json:"key,omitempty"`
	PartitionKey              string `json:"partitionKey,omitempty" deep:"-"`
	ClusterResourceGroupIDKey string `json:"clusterResourceGroupIdKey,omitempty"`
	ClientIDKey               string `json:"clientIdKey,omitempty"`

	Bucket int `json:"bucket,omitempty"`

	LeaseOwner   string `json:"leaseOwner,omitempty" deep:"-"`
	LeaseExpires int    `json:"leaseExpires,omitempty" deep:"-"`
	Dequeues     int    `json:"dequeues,omitempty"`

	AsyncOperationID string `json:"asyncOperationId,omitempty" deep:"-"`

	OpenShiftCluster *OpenShiftCluster `json:"openShiftCluster,omitempty"`

	CorrelationData *CorrelationData `json:"correlationData,omitempty" deep:"-"`
}

OpenShiftClusterDocument represents an OpenShift cluster document. pkg/database/cosmosdb requires its definition.

func ExampleOpenShiftClusterDocument

func ExampleOpenShiftClusterDocument() *OpenShiftClusterDocument

func (*OpenShiftClusterDocument) String

func (c *OpenShiftClusterDocument) String() string

type OpenShiftClusterDocuments

type OpenShiftClusterDocuments struct {
	Count                     int                         `json:"_count,omitempty"`
	ResourceID                string                      `json:"_rid,omitempty"`
	OpenShiftClusterDocuments []*OpenShiftClusterDocument `json:"Documents,omitempty"`
}

OpenShiftClusterDocuments represents OpenShift cluster documents. pkg/database/cosmosdb requires its definition.

func (*OpenShiftClusterDocuments) String

func (c *OpenShiftClusterDocuments) String() string

type OpenShiftClusterProperties

type OpenShiftClusterProperties struct {
	MissingFields

	ArchitectureVersion     ArchitectureVersion `json:"architectureVersion,omitempty"`
	ProvisioningState       ProvisioningState   `json:"provisioningState,omitempty"`
	LastProvisioningState   ProvisioningState   `json:"lastProvisioningState,omitempty"`
	FailedProvisioningState ProvisioningState   `json:"failedProvisioningState,omitempty"`
	LastAdminUpdateError    string              `json:"lastAdminUpdateError,omitempty"`

	CreatedAt time.Time `json:"createdAt,omitempty"`

	// CreatedBy is the RP version (Git commit hash) that created this cluster
	CreatedBy string `json:"createdBy,omitempty"`

	// ProvisionedBy is the RP version (Git commit hash) that last successfully
	// admin updated this cluster
	ProvisionedBy string `json:"provisionedBy,omitempty"`

	ClusterProfile ClusterProfile `json:"clusterProfile,omitempty"`

	ConsoleProfile ConsoleProfile `json:"consoleProfile,omitempty"`

	ServicePrincipalProfile ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`

	NetworkProfile NetworkProfile `json:"networkProfile,omitempty"`

	MasterProfile MasterProfile `json:"masterProfile,omitempty"`

	WorkerProfiles []WorkerProfile `json:"workerProfiles,omitempty"`

	APIServerProfile APIServerProfile `json:"apiserverProfile,omitempty"`

	IngressProfiles []IngressProfile `json:"ingressProfiles,omitempty"`

	// Install is non-nil only when an install is in progress
	Install *Install `json:"install,omitempty"`

	StorageSuffix string `json:"storageSuffix,omitempty"`

	InfraID string      `json:"infraId,omitempty"`
	SSHKey  SecureBytes `json:"sshKey,omitempty"`
	// AdminKubeconfig is installer generated kubeconfig. It is 10 year config,
	// and should never be returned to the user.
	AdminKubeconfig SecureBytes `json:"adminKubeconfig,omitempty"`
	// AROServiceKubeconfig is used by ARO services. In example monitor
	AROServiceKubeconfig SecureBytes `json:"aroServiceKubeconfig,omitempty"`
	// AROSREKubeconfig is used by portal when proxying request from SRE
	AROSREKubeconfig SecureBytes `json:"aroSREKubeconfig,omitempty"`
	// KubeadminPassword installer generated kube-admin passworkd
	KubeadminPassword SecureString `json:"kubeadminPassword,omitempty"`

	// UserAdminKubeconfig is derived admin kubeConfig with shorter live span
	UserAdminKubeconfig SecureBytes `json:"userAdminKubeconfig,omitempty"`

	RegistryProfiles []*RegistryProfile `json:"registryProfiles,omitempty"`
}

OpenShiftClusterProperties represents an OpenShift cluster's properties

type OpenShiftClusterStaticValidator

type OpenShiftClusterStaticValidator interface {
	Static(interface{}, *OpenShiftCluster) error
}

type Operation

type Operation struct {
	// Operation name: {provider}/{resource}/{operation}.
	Name string `json:"name,omitempty"`

	// The object that describes the operation.
	Display Display `json:"display,omitempty"`

	// Sources of requests to this operation.  Comma separated list with valid values user or system, e.g. "user,system".
	Origin string `json:"origin,omitempty"`
}

Operation represents an RP operation.

type OperationList

type OperationList struct {
	// List of operations supported by the resource provider.
	Operations []Operation `json:"value"`

	// The link used to get the next page of operations.
	NextLink string `json:"nextLink,omitempty"`
}

OperationList represents an RP operation list.

type Portal

type Portal struct {
	MissingFields

	Username string `json:"username"`

	// ID is the resourceID of the cluster being accessed by the SRE
	ID string `json:"id,omitempty"`

	SSH        *SSH        `json:"ssh,omitempty"`
	Kubeconfig *Kubeconfig `json:"kubeconfig,omitempty"`
}

Portal represents a portal

type PortalDocument

type PortalDocument struct {
	MissingFields

	// ID is the unique authentication token used by the SRE
	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty"`
	Attachments string                 `json:"_attachments,omitempty"`
	TTL         int                    `json:"ttl,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	Portal *Portal `json:"portal,omitempty"`
}

PortalDocument represents a portal document. pkg/database/cosmosdb requires its definition.

func (*PortalDocument) String

func (c *PortalDocument) String() string

type PortalDocuments

type PortalDocuments struct {
	Count           int               `json:"_count,omitempty"`
	ResourceID      string            `json:"_rid,omitempty"`
	PortalDocuments []*PortalDocument `json:"Documents,omitempty"`
}

PortalDocuments represents portal documents. pkg/database/cosmosdb requires its definition.

func (*PortalDocuments) String

func (c *PortalDocuments) String() string

type ProvisioningState

type ProvisioningState string

ProvisioningState represents a provisioning state

const (
	ProvisioningStateCreating      ProvisioningState = "Creating"
	ProvisioningStateUpdating      ProvisioningState = "Updating"
	ProvisioningStateAdminUpdating ProvisioningState = "AdminUpdating"
	ProvisioningStateDeleting      ProvisioningState = "Deleting"
	ProvisioningStateSucceeded     ProvisioningState = "Succeeded"
	ProvisioningStateFailed        ProvisioningState = "Failed"
)

ProvisioningState constants

func (ProvisioningState) IsTerminal

func (t ProvisioningState) IsTerminal() bool

IsTerminal returns true if state is Terminal

func (ProvisioningState) String

func (t ProvisioningState) String() string

type RegisteredFeatureProfile

type RegisteredFeatureProfile struct {
	MissingFields

	Name  string `json:"name,omitempty"`
	State string `json:"state,omitempty"`
}

RegisteredFeatureProfile represents the features registered to the subscription

type RegistryProfile

type RegistryProfile struct {
	MissingFields

	Name     string       `json:"name,omitempty"`
	Username string       `json:"username,omitempty"`
	Password SecureString `json:"password,omitempty"`
}

RegistryProfile represents a registry's login

type SSH

type SSH struct {
	MissingFields

	Master        int  `json:"master"`
	Authenticated bool `json:"authenticated,omitempty"`
}

type SecureBytes

type SecureBytes []byte

SecureBytes represents an encrypted []byte

type SecureString

type SecureString string

SecureString represents an encrypted string

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	MissingFields

	ClientID     string       `json:"clientId,omitempty"`
	ClientSecret SecureString `json:"clientSecret,omitempty"`
	SPObjectID   string       `json:"spObjectId,omitempty"`
}

ServicePrincipalProfile represents a service principal profile.

type Subscription

type Subscription struct {
	MissingFields

	State SubscriptionState `json:"state,omitempty"`

	Properties *SubscriptionProperties `json:"properties,omitempty"`
}

Subscription represents a subscription

type SubscriptionDocument

type SubscriptionDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	LeaseOwner   string `json:"leaseOwner,omitempty"`
	LeaseExpires int    `json:"leaseExpires,omitempty"`
	Dequeues     int    `json:"dequeues,omitempty"`

	Deleting bool `json:"deleting,omitempty"`

	Subscription *Subscription `json:"subscription,omitempty"`
}

SubscriptionDocument represents a subscription document. pkg/database/cosmosdb requires its definition.

func (*SubscriptionDocument) String

func (c *SubscriptionDocument) String() string

type SubscriptionDocuments

type SubscriptionDocuments struct {
	Count                 int                     `json:"_count,omitempty"`
	ResourceID            string                  `json:"_rid,omitempty"`
	SubscriptionDocuments []*SubscriptionDocument `json:"Documents,omitempty"`
}

SubscriptionDocuments represents subscription documents. pkg/database/cosmosdb requires its definition.

func (*SubscriptionDocuments) String

func (c *SubscriptionDocuments) String() string

type SubscriptionProperties

type SubscriptionProperties struct {
	MissingFields

	TenantID           string                     `json:"tenantId,omitempty"`
	AccountOwner       *AccountOwnerProfile       `json:"accountOwner,omitempty"`
	RegisteredFeatures []RegisteredFeatureProfile `json:"registeredFeatures,omitempty"`
}

SubscriptionProperties represents subscription properties

type SubscriptionState

type SubscriptionState string

SubscriptionState represents a subscription state

const (
	SubscriptionStateRegistered   SubscriptionState = "Registered"
	SubscriptionStateUnregistered SubscriptionState = "Unregistered"
	SubscriptionStateWarned       SubscriptionState = "Warned"
	SubscriptionStateSuspended    SubscriptionState = "Suspended"
	SubscriptionStateDeleted      SubscriptionState = "Deleted"
)

SubscriptionState constants

type SystemData

type SystemData struct {
	CreatedBy          string        `json:"createdBy,omitempty"`
	CreatedByType      CreatedByType `json:"createdByType,omitempty"`
	CreatedAt          *time.Time    `json:"createdAt,omitempty"`
	LastModifiedBy     string        `json:"lastModifiedBy,omitempty"`
	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
	LastModifiedAt     *time.Time    `json:"lastModifiedAt,omitempty"`
}

SystemData represets metadata provided by arm. Time fields inside the struct are pointers so we could better verify which fields are provided to use by ARM or not. Time package does not comply with omitempty. More details about requirements: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources

type VMSize

type VMSize string

VMSize represents a VM size

const (
	VMSizeStandardD2sV3 VMSize = "Standard_D2s_v3"

	VMSizeStandardD4asV4  VMSize = "Standard_D4as_v4"
	VMSizeStandardD8asV4  VMSize = "Standard_D8as_v4"
	VMSizeStandardD16asV4 VMSize = "Standard_D16as_v4"
	VMSizeStandardD32asV4 VMSize = "Standard_D32as_v4"

	VMSizeStandardD4sV3  VMSize = "Standard_D4s_v3"
	VMSizeStandardD8sV3  VMSize = "Standard_D8s_v3"
	VMSizeStandardD16sV3 VMSize = "Standard_D16s_v3"
	VMSizeStandardD32sV3 VMSize = "Standard_D32s_v3"

	VMSizeStandardE4sV3   VMSize = "Standard_E4s_v3"
	VMSizeStandardE8sV3   VMSize = "Standard_E8s_v3"
	VMSizeStandardE16sV3  VMSize = "Standard_E16s_v3"
	VMSizeStandardE32sV3  VMSize = "Standard_E32s_v3"
	VMSizeStandardE64isV3 VMSize = "Standard_E64is_v3"
	VMSizeStandardE64iV3  VMSize = "Standard_E64i_v3"

	VMSizeStandardF4sV2  VMSize = "Standard_F4s_v2"
	VMSizeStandardF8sV2  VMSize = "Standard_F8s_v2"
	VMSizeStandardF16sV2 VMSize = "Standard_F16s_v2"
	VMSizeStandardF32sV2 VMSize = "Standard_F32s_v2"
	VMSizeStandardF72sV2 VMSize = "Standard_F72s_v2"

	VMSizeStandardM128ms VMSize = "Standard_M128ms"
	VMSizeStandardG5     VMSize = "Standard_G5"
	VMSizeStandardGS5    VMSize = "Standard_GS5"
)

VMSize constants add required resources in pkg/api/validate/quota.go when adding a new VMSize

type Version

type Version struct {
	OpenShiftClusterConverter                func() OpenShiftClusterConverter
	OpenShiftClusterStaticValidator          func(string, string, bool, string) OpenShiftClusterStaticValidator
	OpenShiftClusterCredentialsConverter     func() OpenShiftClusterCredentialsConverter
	OpenShiftClusterAdminKubeconfigConverter func() OpenShiftClusterAdminKubeconfigConverter
}

Version is a set of endpoints implemented by each API version

type Visibility

type Visibility string

Visibility represents visibility.

const (
	VisibilityPublic  Visibility = "Public"
	VisibilityPrivate Visibility = "Private"
)

Visibility constants

type WorkerProfile

type WorkerProfile struct {
	MissingFields

	Name       string `json:"name,omitempty"`
	VMSize     VMSize `json:"vmSize,omitempty"`
	DiskSizeGB int    `json:"diskSizeGB,omitempty"`
	SubnetID   string `json:"subnetId,omitempty"`
	Count      int    `json:"count,omitempty"`
}

WorkerProfile represents a worker profile

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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