cluster

package
v0.0.0-...-da89f2f Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClustersUserPath

func ClustersUserPath() string

ClustersUserPath computes a request path to the clusters action of user.

func CreateClustersPath

func CreateClustersPath() string

CreateClustersPath computes a request path to the create action of clusters.

func DeleteClustersPath

func DeleteClustersPath(clusterID uuid.UUID) string

DeleteClustersPath computes a request path to the delete action of clusters.

func LinkIdentityToClusterClustersPath

func LinkIdentityToClusterClustersPath() string

LinkIdentityToClusterClustersPath computes a request path to the linkIdentityToCluster action of clusters.

func ListClustersPath

func ListClustersPath() string

ListClustersPath computes a request path to the list action of clusters.

func ListForAuthClientClustersPath

func ListForAuthClientClustersPath() string

ListForAuthClientClustersPath computes a request path to the listForAuthClient action of clusters.

func RemoveIdentityToClusterLinkClustersPath

func RemoveIdentityToClusterLinkClustersPath() string

RemoveIdentityToClusterLinkClustersPath computes a request path to the removeIdentityToClusterLink action of clusters.

func ShowClustersPath

func ShowClustersPath(clusterID uuid.UUID) string

ShowClustersPath computes a request path to the show action of clusters.

func ShowForAuthClientClustersPath

func ShowForAuthClientClustersPath(clusterID uuid.UUID) string

ShowForAuthClientClustersPath computes a request path to the showForAuthClient action of clusters.

func ShowStatusPath

func ShowStatusPath() string

ShowStatusPath computes a request path to the show action of status.

Types

type Client

type Client struct {
	*goaclient.Client
	JWTSigner goaclient.Signer
	Encoder   *goa.HTTPEncoder
	Decoder   *goa.HTTPDecoder
}

Client is the cluster service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) ClustersUser

func (c *Client) ClustersUser(ctx context.Context, path string) (*http.Response, error)

Get clusters available to user

func (*Client) CreateClusters

func (c *Client) CreateClusters(ctx context.Context, path string, payload *CreateClustersPayload) (*http.Response, error)

Add a cluster configuration

func (*Client) DecodeClusterList

func (c *Client) DecodeClusterList(resp *http.Response) (*ClusterList, error)

DecodeClusterList decodes the ClusterList instance encoded in resp body.

func (*Client) DecodeClusterSingle

func (c *Client) DecodeClusterSingle(resp *http.Response) (*ClusterSingle, error)

DecodeClusterSingle decodes the ClusterSingle instance encoded in resp body.

func (*Client) DecodeCreateClusterSingle

func (c *Client) DecodeCreateClusterSingle(resp *http.Response) (*CreateClusterSingle, error)

DecodeCreateClusterSingle decodes the CreateClusterSingle instance encoded in resp body.

func (*Client) DecodeFullClusterList

func (c *Client) DecodeFullClusterList(resp *http.Response) (*FullClusterList, error)

DecodeFullClusterList decodes the FullClusterList instance encoded in resp body.

func (*Client) DecodeFullClusterSingle

func (c *Client) DecodeFullClusterSingle(resp *http.Response) (*FullClusterSingle, error)

DecodeFullClusterSingle decodes the FullClusterSingle instance encoded in resp body.

func (*Client) DecodeJSONAPIErrors

func (c *Client) DecodeJSONAPIErrors(resp *http.Response) (*JSONAPIErrors, error)

DecodeJSONAPIErrors decodes the JSONAPIErrors instance encoded in resp body.

func (*Client) DecodeStatus

func (c *Client) DecodeStatus(resp *http.Response) (*Status, error)

DecodeStatus decodes the Status instance encoded in resp body.

func (*Client) DeleteClusters

func (c *Client) DeleteClusters(ctx context.Context, path string) (*http.Response, error)

Delete a cluster configuration

func (*Client) LinkIdentityToClusterClusters

func (c *Client) LinkIdentityToClusterClusters(ctx context.Context, path string, payload *LinkIdentityToClusterData) (*http.Response, error)

create a identitycluster using a service account

func (*Client) ListClusters

func (c *Client) ListClusters(ctx context.Context, path string, clusterURL *string, type_ *string) (*http.Response, error)

Get all cluster configurations. If the 'cluster-url' query parameter is set, then a single cluster is returned. If the 'type' query parameter is set then only the clusters with the matchin type are returned

func (*Client) ListForAuthClientClusters

func (c *Client) ListForAuthClientClusters(ctx context.Context, path string, clusterURL *string, type_ *string) (*http.Response, error)

Get all cluster configurations unless the 'cluster-url' is specified. This endpoint returns all sensitive information

func (*Client) NewClustersUserRequest

func (c *Client) NewClustersUserRequest(ctx context.Context, path string) (*http.Request, error)

NewClustersUserRequest create the request corresponding to the clusters action endpoint of the user resource.

func (*Client) NewCreateClustersRequest

func (c *Client) NewCreateClustersRequest(ctx context.Context, path string, payload *CreateClustersPayload) (*http.Request, error)

NewCreateClustersRequest create the request corresponding to the create action endpoint of the clusters resource.

func (*Client) NewDeleteClustersRequest

func (c *Client) NewDeleteClustersRequest(ctx context.Context, path string) (*http.Request, error)

NewDeleteClustersRequest create the request corresponding to the delete action endpoint of the clusters resource.

func (*Client) NewLinkIdentityToClusterClustersRequest

func (c *Client) NewLinkIdentityToClusterClustersRequest(ctx context.Context, path string, payload *LinkIdentityToClusterData) (*http.Request, error)

NewLinkIdentityToClusterClustersRequest create the request corresponding to the linkIdentityToCluster action endpoint of the clusters resource.

func (*Client) NewListClustersRequest

func (c *Client) NewListClustersRequest(ctx context.Context, path string, clusterURL *string, type_ *string) (*http.Request, error)

NewListClustersRequest create the request corresponding to the list action endpoint of the clusters resource.

func (*Client) NewListForAuthClientClustersRequest

func (c *Client) NewListForAuthClientClustersRequest(ctx context.Context, path string, clusterURL *string, type_ *string) (*http.Request, error)

NewListForAuthClientClustersRequest create the request corresponding to the listForAuthClient action endpoint of the clusters resource.

func (*Client) NewRemoveIdentityToClusterLinkClustersRequest

func (c *Client) NewRemoveIdentityToClusterLinkClustersRequest(ctx context.Context, path string, payload *UnLinkIdentityToClusterdata) (*http.Request, error)

NewRemoveIdentityToClusterLinkClustersRequest create the request corresponding to the removeIdentityToClusterLink action endpoint of the clusters resource.

func (*Client) NewShowClustersRequest

func (c *Client) NewShowClustersRequest(ctx context.Context, path string) (*http.Request, error)

NewShowClustersRequest create the request corresponding to the show action endpoint of the clusters resource.

func (*Client) NewShowForAuthClientClustersRequest

func (c *Client) NewShowForAuthClientClustersRequest(ctx context.Context, path string) (*http.Request, error)

NewShowForAuthClientClustersRequest create the request corresponding to the showForAuthClient action endpoint of the clusters resource.

func (*Client) NewShowStatusRequest

func (c *Client) NewShowStatusRequest(ctx context.Context, path string) (*http.Request, error)

NewShowStatusRequest create the request corresponding to the show action endpoint of the status resource.

func (*Client) RemoveIdentityToClusterLinkClusters

func (c *Client) RemoveIdentityToClusterLinkClusters(ctx context.Context, path string, payload *UnLinkIdentityToClusterdata) (*http.Response, error)

Remove a identity cluster relation using a service account

func (*Client) SetJWTSigner

func (c *Client) SetJWTSigner(signer goaclient.Signer)

SetJWTSigner sets the request signer for the jwt security scheme.

func (*Client) ShowClusters

func (c *Client) ShowClusters(ctx context.Context, path string) (*http.Response, error)

Get single cluster configuration

func (*Client) ShowForAuthClientClusters

func (c *Client) ShowForAuthClientClusters(ctx context.Context, path string) (*http.Response, error)

Get single cluster configuration (including Auth information)

func (*Client) ShowStatus

func (c *Client) ShowStatus(ctx context.Context, path string) (*http.Response, error)

Show the status of the current running instance

type ClusterData

type ClusterData struct {
	// API URL
	APIURL string `form:"api-url" json:"api-url" xml:"api-url"`
	// User application domain name in the cluster
	AppDNS string `form:"app-dns" json:"app-dns" xml:"app-dns"`
	// Cluster is full if set to 'true'
	CapacityExhausted bool `form:"capacity-exhausted" json:"capacity-exhausted" xml:"capacity-exhausted"`
	// Web console URL
	ConsoleURL string `form:"console-url" json:"console-url" xml:"console-url"`
	// Logging URL
	LoggingURL string `form:"logging-url" json:"logging-url" xml:"logging-url"`
	// Metrics URL
	MetricsURL string `form:"metrics-url" json:"metrics-url" xml:"metrics-url"`
	// Cluster name
	Name string `form:"name" json:"name" xml:"name"`
	// Cluster type. Such as OSD, OSO, OCP, etc
	Type string `form:"type" json:"type" xml:"type"`
}

ClusterData user type.

func (*ClusterData) Validate

func (ut *ClusterData) Validate() (err error)

Validate validates the ClusterData type instance.

type ClusterList

type ClusterList struct {
	Data []*ClusterData `form:"data" json:"data" xml:"data"`
	// An array of mixed types
	Included []interface{} `form:"included,omitempty" json:"included,omitempty" xml:"included,omitempty"`
}

Holds the response to a cluster list request (default view)

Identifier: application/vnd.clusterlist+json; view=default

func (*ClusterList) Validate

func (mt *ClusterList) Validate() (err error)

Validate validates the ClusterList media type instance.

type ClusterSingle

type ClusterSingle struct {
	Data *ClusterData `form:"data" json:"data" xml:"data"`
	// An array of mixed types
	Included []interface{} `form:"included,omitempty" json:"included,omitempty" xml:"included,omitempty"`
}

Holds the response to a cluster request (default view)

Identifier: application/vnd.cluster+json; view=default

func (*ClusterSingle) Validate

func (mt *ClusterSingle) Validate() (err error)

Validate validates the ClusterSingle media type instance.

type CreateClusterData

type CreateClusterData struct {
	// API URL
	APIURL string `form:"api-url" json:"api-url" xml:"api-url"`
	// User application domain name in the cluster
	AppDNS string `form:"app-dns" json:"app-dns" xml:"app-dns"`
	// OAuth client default scope
	AuthClientDefaultScope string `form:"auth-client-default-scope" json:"auth-client-default-scope" xml:"auth-client-default-scope"`
	// OAuth client ID
	AuthClientID string `form:"auth-client-id" json:"auth-client-id" xml:"auth-client-id"`
	// OAuth client secret
	AuthClientSecret string `form:"auth-client-secret" json:"auth-client-secret" xml:"auth-client-secret"`
	// Cluster is full if set to 'true'
	CapacityExhausted *bool `form:"capacity-exhausted,omitempty" json:"capacity-exhausted,omitempty" xml:"capacity-exhausted,omitempty"`
	// Web console URL
	ConsoleURL *string `form:"console-url,omitempty" json:"console-url,omitempty" xml:"console-url,omitempty"`
	// Logging URL
	LoggingURL *string `form:"logging-url,omitempty" json:"logging-url,omitempty" xml:"logging-url,omitempty"`
	// Metrics URL
	MetricsURL *string `form:"metrics-url,omitempty" json:"metrics-url,omitempty" xml:"metrics-url,omitempty"`
	// Cluster name
	Name string `form:"name" json:"name" xml:"name"`
	// Decrypted cluster wide token
	ServiceAccountToken string `form:"service-account-token" json:"service-account-token" xml:"service-account-token"`
	// Username of the cluster wide user
	ServiceAccountUsername string `form:"service-account-username" json:"service-account-username" xml:"service-account-username"`
	// Token provider ID
	TokenProviderID *string `form:"token-provider-id,omitempty" json:"token-provider-id,omitempty" xml:"token-provider-id,omitempty"`
	// Cluster type. Such as OSD, OSO, OCP, etc
	Type string `form:"type" json:"type" xml:"type"`
}

CreateClusterData user type.

func (*CreateClusterData) Validate

func (ut *CreateClusterData) Validate() (err error)

Validate validates the CreateClusterData type instance.

type CreateClusterSingle

type CreateClusterSingle struct {
	Data *CreateClusterData `form:"data" json:"data" xml:"data"`
	// An array of mixed types
	Included []interface{} `form:"included,omitempty" json:"included,omitempty" xml:"included,omitempty"`
}

Holds the data to create a cluster (default view)

Identifier: application/vnd.createcluster+json; view=default

func (*CreateClusterSingle) Validate

func (mt *CreateClusterSingle) Validate() (err error)

Validate validates the CreateClusterSingle media type instance.

type CreateClustersPayload

type CreateClustersPayload struct {
	Data *CreateClusterData `form:"data" json:"data" xml:"data"`
	// An array of mixed types
	Included []interface{} `form:"included,omitempty" json:"included,omitempty" xml:"included,omitempty"`
}

CreateClustersPayload is the clusters create action payload.

type FullClusterData

type FullClusterData struct {
	// API URL
	APIURL string `form:"api-url" json:"api-url" xml:"api-url"`
	// User application domain name in the cluster
	AppDNS string `form:"app-dns" json:"app-dns" xml:"app-dns"`
	// OAuth client default scope
	AuthClientDefaultScope string `form:"auth-client-default-scope" json:"auth-client-default-scope" xml:"auth-client-default-scope"`
	// OAuth client ID
	AuthClientID string `form:"auth-client-id" json:"auth-client-id" xml:"auth-client-id"`
	// OAuth client secret
	AuthClientSecret string `form:"auth-client-secret" json:"auth-client-secret" xml:"auth-client-secret"`
	// Cluster is full if set to 'true'
	CapacityExhausted bool `form:"capacity-exhausted" json:"capacity-exhausted" xml:"capacity-exhausted"`
	// Web console URL
	ConsoleURL string `form:"console-url" json:"console-url" xml:"console-url"`
	// Logging URL
	LoggingURL string `form:"logging-url" json:"logging-url" xml:"logging-url"`
	// Metrics URL
	MetricsURL string `form:"metrics-url" json:"metrics-url" xml:"metrics-url"`
	// Cluster name
	Name string `form:"name" json:"name" xml:"name"`
	// encrypted Service Account Token set to 'true'
	SaTokenEncrypted *bool `form:"sa-token-encrypted,omitempty" json:"sa-token-encrypted,omitempty" xml:"sa-token-encrypted,omitempty"`
	// Decrypted cluster wide token
	ServiceAccountToken string `form:"service-account-token" json:"service-account-token" xml:"service-account-token"`
	// Username of the cluster wide user
	ServiceAccountUsername string `form:"service-account-username" json:"service-account-username" xml:"service-account-username"`
	// Token provider ID
	TokenProviderID string `form:"token-provider-id" json:"token-provider-id" xml:"token-provider-id"`
	// Cluster type. Such as OSD, OSO, OCP, etc
	Type string `form:"type" json:"type" xml:"type"`
}

FullClusterData user type.

func (*FullClusterData) Validate

func (ut *FullClusterData) Validate() (err error)

Validate validates the FullClusterData type instance.

type FullClusterList

type FullClusterList struct {
	Data []*FullClusterData `form:"data" json:"data" xml:"data"`
	// An array of mixed types
	Included []interface{} `form:"included,omitempty" json:"included,omitempty" xml:"included,omitempty"`
}

Holds the response to a full cluster list request (default view)

Identifier: application/vnd.fullclusterlist+json; view=default

func (*FullClusterList) Validate

func (mt *FullClusterList) Validate() (err error)

Validate validates the FullClusterList media type instance.

type FullClusterSingle

type FullClusterSingle struct {
	Data *FullClusterData `form:"data" json:"data" xml:"data"`
	// An array of mixed types
	Included []interface{} `form:"included,omitempty" json:"included,omitempty" xml:"included,omitempty"`
}

Holds the response to a cluster request (default view)

Identifier: application/vnd.fullcluster+json; view=default

func (*FullClusterSingle) Validate

func (mt *FullClusterSingle) Validate() (err error)

Validate validates the FullClusterSingle media type instance.

type GenericData

type GenericData struct {
	// UUID of the object
	ID    *string       `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	Links *GenericLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
	Type  *string       `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"`
}

GenericData user type.

type GenericLinks struct {
	Meta    map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"`
	Related *string                `form:"related,omitempty" json:"related,omitempty" xml:"related,omitempty"`
	Self    *string                `form:"self,omitempty" json:"self,omitempty" xml:"self,omitempty"`
}

GenericLinks user type.

type JSONAPIError

type JSONAPIError struct {
	// an application-specific error code, expressed as a string value.
	Code *string `form:"code,omitempty" json:"code,omitempty" xml:"code,omitempty"`
	// a human-readable explanation specific to this occurrence of the problem.
	// Like title, this field’s value can be localized.
	Detail string `form:"detail" json:"detail" xml:"detail"`
	// a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// a links object containing the following members:
	// * about: a link that leads to further details about this particular occurrence of the problem.
	Links map[string]*JSONAPILink `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
	// a meta object containing non-standard meta-information about the error
	Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"`
	// an object containing references to the source of the error,
	// optionally including any of the following members
	//
	// * pointer: a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/data" for a primary data object,
	//            or "/data/attributes/title" for a specific attribute].
	// * parameter: a string indicating which URI query parameter caused the error.
	Source map[string]interface{} `form:"source,omitempty" json:"source,omitempty" xml:"source,omitempty"`
	// the HTTP status code applicable to this problem, expressed as a string value.
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	// a short, human-readable summary of the problem that SHOULD NOT
	// change from occurrence to occurrence of the problem, except for purposes of localization.
	Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"`
}

Error objects provide additional information about problems encountered while performing an operation. Error objects MUST be returned as an array keyed by errors in the top level of a JSON API document.

See. also http://jsonapi.org/format/#error-objects.

func (*JSONAPIError) Validate

func (ut *JSONAPIError) Validate() (err error)

Validate validates the JSONAPIError type instance.

type JSONAPIErrors

type JSONAPIErrors struct {
	Errors []*JSONAPIError `form:"errors" json:"errors" xml:"errors"`
}

JSONAPIErrors media type (default view)

Identifier: application/vnd.jsonapierrors+json; view=default

func (*JSONAPIErrors) Validate

func (mt *JSONAPIErrors) Validate() (err error)

Validate validates the JSONAPIErrors media type instance.

type JSONAPILink struct {
	// a string containing the link's URL.
	Href *string `form:"href,omitempty" json:"href,omitempty" xml:"href,omitempty"`
	// a meta object containing non-standard meta-information about the link.
	Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"`
}

See also http://jsonapi.org/format/#document-links.

type LinkIdentityToClusterData

type LinkIdentityToClusterData struct {
	// Cluster URL
	ClusterURL string `form:"cluster-url" json:"cluster-url" xml:"cluster-url"`
	// The id of corresponding Identity
	IdentityID string `form:"identity-id" json:"identity-id" xml:"identity-id"`
	// Ignore creation error if this identity already exists. By default 'True'
	IgnoreIfAlreadyExists *bool `form:"ignore-if-already-exists,omitempty" json:"ignore-if-already-exists,omitempty" xml:"ignore-if-already-exists,omitempty"`
}

LinkIdentityToClusterData user type.

func (*LinkIdentityToClusterData) Validate

func (ut *LinkIdentityToClusterData) Validate() (err error)

Validate validates the LinkIdentityToClusterData type instance.

type RelationGeneric

type RelationGeneric struct {
	Data  *GenericData           `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
	Links *GenericLinks          `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
	Meta  map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"`
}

RelationGeneric user type.

type RelationGenericList

type RelationGenericList struct {
	Data  []*GenericData         `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
	Links *GenericLinks          `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
	Meta  map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"`
}

RelationGenericList user type.

type Status

type Status struct {
	// The time when built
	BuildTime string `form:"buildTime" json:"buildTime" xml:"buildTime"`
	// Commit SHA this build is based on
	Commit string `form:"commit" json:"commit" xml:"commit"`
	// The status of the used configuration. 'OK' or an error message if there is something wrong with the configuration used by service.
	ConfigurationStatus string `form:"configurationStatus" json:"configurationStatus" xml:"configurationStatus"`
	// The status of Database connection. 'OK' or an error message is displayed.
	DatabaseStatus string `form:"databaseStatus" json:"databaseStatus" xml:"databaseStatus"`
	// 'True' if the Developer Mode is enabled
	DevMode *bool `form:"devMode,omitempty" json:"devMode,omitempty" xml:"devMode,omitempty"`
	// The time when started
	StartTime string `form:"startTime" json:"startTime" xml:"startTime"`
}

The status of the current running instance (default view)

Identifier: application/vnd.status+json; view=default

func (*Status) Validate

func (mt *Status) Validate() (err error)

Validate validates the Status media type instance.

type UnLinkIdentityToClusterdata

type UnLinkIdentityToClusterdata struct {
	// Cluster URL
	ClusterURL string `form:"cluster-url" json:"cluster-url" xml:"cluster-url"`
	// The id of corresponding Identity
	IdentityID string `form:"identity-id" json:"identity-id" xml:"identity-id"`
}

UnLinkIdentityToClusterdata user type.

func (*UnLinkIdentityToClusterdata) Validate

func (ut *UnLinkIdentityToClusterdata) Validate() (err error)

Validate validates the UnLinkIdentityToClusterdata type instance.

Jump to

Keyboard shortcuts

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