Documentation
¶
Index ¶
- type ConfigMap
- func Create(client *golangsdk.ServiceClient, namespace string, opts CreateOpts) (*ConfigMap, error)
- func ExtractConfigMaps(r pagination.NewPage) ([]ConfigMap, error)
- func Get(client *golangsdk.ServiceClient, namespace string, name string) (*ConfigMap, error)
- func List(client *golangsdk.ServiceClient, namespace string, opts ListOpts) ([]ConfigMap, error)
- func Update(client *golangsdk.ServiceClient, namespace string, name string, ...) (*ConfigMap, error)
- type ConfigMapPage
- type CreateOpts
- type DeleteOpts
- type DeleteResult
- type ListOpts
- type ManagedFieldsEntry
- type ObjectMeta
- type OwnerReference
- type Preconditions
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigMap ¶
type ConfigMap struct {
// APIVersion defines the versioned schema of this representation of an object
APIVersion string `json:"apiVersion"`
// BinaryData contains the binary data
BinaryData map[string]string `json:"binaryData"`
// Data contains the configuration data
Data map[string]string `json:"data"`
// Immutable if set to true, ensures that data stored in the ConfigMap cannot be updated
Immutable *bool `json:"immutable"`
// Kind is a string value representing the REST resource this object represents
Kind string `json:"kind"`
// Metadata contains the object metadata
Metadata ObjectMeta `json:"metadata"`
}
ConfigMapResponse represents the response when creating a ConfigMap
func Create ¶
func Create(client *golangsdk.ServiceClient, namespace string, opts CreateOpts) (*ConfigMap, error)
Create requests the creation of a new ConfigMap
func ExtractConfigMaps ¶
func ExtractConfigMaps(r pagination.NewPage) ([]ConfigMap, error)
ExtractConfigMaps accepts a Page struct, specifically a ConfigMapPage struct, and extracts the elements into a slice of ConfigMap structs.
func Update ¶
func Update(client *golangsdk.ServiceClient, namespace string, name string, opts UpdateOpts) (*ConfigMap, error)
Update modifies the specified ConfigMap
type ConfigMapPage ¶
type ConfigMapPage struct {
pagination.NewSinglePageBase
}
ConfigMapPage is the page returned by a pager when traversing over a collection of configmaps.
type CreateOpts ¶
type CreateOpts struct {
// APIVersion defines the versioned schema of this representation of an object
APIVersion string `json:"apiVersion,omitempty"`
// BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'
BinaryData map[string]string `json:"binaryData,omitempty"`
// Data contains the configuration data
Data map[string]string `json:"data,omitempty"`
// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated
Immutable *bool `json:"immutable,omitempty"`
// Kind is a string value representing the REST resource this object represents
Kind string `json:"kind,omitempty"`
// Metadata contains the object metadata
Metadata ObjectMeta `json:"metadata,omitempty"`
}
CreateOpts contains the parameters for creating a ConfigMap
type DeleteOpts ¶
type DeleteOpts struct {
// APIVersion defines the versioned schema of this representation of an object
APIVersion string `json:"apiVersion,omitempty"`
// DryRun when present, indicates that modifications should not be persisted
DryRun []string `json:"dryRun,omitempty"`
// GracePeriodSeconds the duration in seconds before the object should be deleted
GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"`
// Kind is a string value representing the REST resource this object represents
Kind string `json:"kind,omitempty"`
// OrphanDependents should the dependent objects be orphaned
OrphanDependents *bool `json:"orphanDependents,omitempty"`
// Preconditions must be fulfilled before a deletion is carried out
Preconditions *Preconditions `json:"preconditions,omitempty"`
// PropagationPolicy whether and how garbage collection will be performed
PropagationPolicy string `json:"propagationPolicy,omitempty"`
}
DeleteOpts contains all the values needed to delete a ConfigMap
type DeleteResult ¶
type DeleteResult struct {
// APIVersion defines the versioned schema of this representation of an object
APIVersion string `json:"apiVersion,omitempty"`
// BinaryData contains the binary data
BinaryData map[string]string `json:"binaryData,omitempty"`
// Data contains the configuration data
Data map[string]string `json:"data,omitempty"`
// Immutable if set to true, ensures that data stored in the ConfigMap cannot be updated
Immutable *bool `json:"immutable,omitempty"`
// Kind is a string value representing the REST resource this object represents
Kind string `json:"kind,omitempty"`
// Metadata contains the object metadata
Metadata ObjectMeta `json:"metadata,omitempty"`
}
DeleteResult represents the API response after deletion
func Delete ¶
func Delete(client *golangsdk.ServiceClient, namespace string, name string, opts DeleteOpts) (*DeleteResult, error)
Delete removes a ConfigMap
type ListOpts ¶
type ListOpts struct {
// AllowWatchBookmarks requests watch events with type "BOOKMARK"
AllowWatchBookmarks *bool `q:"allowWatchBookmarks,omitempty"`
// Continue option should be set when retrieving more results from the server
Continue string `q:"continue,omitempty"`
// FieldSelector is a selector to restrict the list of returned objects by their fields
FieldSelector string `q:"fieldSelector,omitempty"`
// LabelSelector is a selector to restrict the list of returned objects by their labels
LabelSelector string `q:"labelSelector,omitempty"`
// Limit is a maximum number of responses to return for a list call
Limit *int `q:"limit,omitempty"`
// ResourceVersion sets a constraint on what resource versions a request may be served from
ResourceVersion string `q:"resourceVersion,omitempty"`
// ResourceVersionMatch determines how resourceVersion is applied to list calls
ResourceVersionMatch string `q:"resourceVersionMatch,omitempty"`
// SendInitialEvents when set together with Watch option
SendInitialEvents *bool `q:"sendInitialEvents,omitempty"`
// TimeoutSeconds is timeout for the list/watch call
TimeoutSeconds *int `q:"timeoutSeconds,omitempty"`
// Watch for changes to the described resources
Watch *bool `q:"watch,omitempty"`
// Pretty if 'true', then the output is pretty printed
Pretty string `q:"pretty,omitempty"`
}
ListOpts allows the filtering and sorting of paginated collections through the API
type ManagedFieldsEntry ¶
type ManagedFieldsEntry struct {
// APIVersion defines the version of this resource
APIVersion string `json:"apiVersion"`
// FieldsType is the discriminator for the different fields format and version
FieldsType string `json:"fieldsType"`
// FieldsV1 holds the first JSON version format
FieldsV1 interface{} `json:"fieldsV1,"`
// Manager is an identifier of the workflow managing these fields
Manager string `json:"manager"`
// Operation is the type of operation which lead to this ManagedFieldsEntry
Operation string `json:"operation"`
// Time is timestamp of when these fields were set
Time string `json:"time"`
}
ManagedFieldsEntry contains workflow-managed fields
type ObjectMeta ¶
type ObjectMeta struct {
// Annotations is an unstructured key value map stored with a resource
Annotations map[string]string `json:"annotations,omitempty"`
// ClusterName is the name of the cluster which the object belongs to
ClusterName string `json:"clusterName,omitempty"`
// CreationTimestamp is a timestamp representing the server time when this object was created
CreationTimestamp string `json:"creationTimestamp,omitempty"`
// DeletionGracePeriodSeconds is the duration in seconds before the object should be deleted
DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"`
// DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted
DeletionTimestamp string `json:"deletionTimestamp,omitempty"`
// Enable identifies whether the resource is available
Enable *bool `json:"enable,omitempty"`
// Finalizers is a list of identifiers for resource cleanup
Finalizers []string `json:"finalizers,omitempty"`
// GenerateName is an optional prefix for generating a unique name
GenerateName string `json:"generateName,omitempty"`
// Generation is a sequence number representing a specific generation of the desired state
Generation int64 `json:"generation,omitempty"`
// Labels map of string keys and values for organization
Labels map[string]string `json:"labels,omitempty"`
// ManagedFields maps workflow-id and version to the set of fields
ManagedFields []ManagedFieldsEntry `json:"managedFields,omitempty"`
// Name must be unique within a namespace
Name string `json:"name"`
// Namespace defines the space within which each name must be unique
Namespace string `json:"namespace,omitempty"`
// OwnerReferences list of objects depended by this object
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
// ResourceVersion is an opaque value that represents the internal version of this object
ResourceVersion string `json:"resourceVersion,omitempty"`
// SelfLink is a URL representing this object
SelfLink string `json:"selfLink,omitempty"`
// UID is the unique in time and space value for this object
UID string `json:"uid,omitempty"`
}
ObjectMeta standard object metadata
type OwnerReference ¶
type OwnerReference struct {
// APIVersion of the referent
APIVersion string `json:"apiVersion"`
// BlockOwnerDeletion will block garbage collection of the owner
BlockOwnerDeletion *bool `json:"blockOwnerDeletion"`
// Controller identifies whether this OwnerReference points to the managing controller
Controller *bool `json:"controller"`
// Kind of the referent
Kind string `json:"kind"`
// Name of the referent
Name string `json:"name"`
// UID of the referent
UID string `json:"uid"`
}
OwnerReference contains enough information to let you identify an owning object
type Preconditions ¶
type Preconditions struct {
// ResourceVersion specifies the target ResourceVersion
ResourceVersion string `json:"resourceVersion,omitempty"`
// UID specifies the target UID
UID string `json:"uid,omitempty"`
}
Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out
type UpdateOpts ¶
type UpdateOpts struct {
// APIVersion defines the versioned schema of this representation of an object
APIVersion string `json:"apiVersion,omitempty"`
// BinaryData contains the binary data
BinaryData map[string]string `json:"binaryData,omitempty"`
// Data contains the configuration data
Data map[string]string `json:"data,omitempty"`
// Immutable if set to true, ensures that data stored in the ConfigMap cannot be updated
Immutable *bool `json:"immutable,omitempty"`
// Kind is a string value representing the REST resource this object represents
Kind string `json:"kind,omitempty"`
// Metadata contains the object metadata
Metadata *ObjectMeta `json:"metadata,omitempty"`
}
UpdateOpts contains all the values needed to update a ConfigMap