Documentation ¶
Index ¶
- Constants
- Variables
- func AccessControlListGVK() apiv1.GroupVersionKind
- func CommandLineInterfaceGVK() apiv1.GroupVersionKind
- func ResourceDefinitionGVK() apiv1.GroupVersionKind
- func ResourceDefinitionVersionGVK() apiv1.GroupVersionKind
- func ResourceGroupGVK() apiv1.GroupVersionKind
- type AccessControlList
- func (res *AccessControlList) AsInstance() (*apiv1.ResourceInstance, error)
- func (res *AccessControlList) FromInstance(ri *apiv1.ResourceInstance) error
- func (res *AccessControlList) MarshalJSON() ([]byte, error)
- func (res *AccessControlList) PluralName() string
- func (res *AccessControlList) UnmarshalJSON(data []byte) error
- type AccessControlListSpec
- type AccessControlListSpecAccessLevelScope
- type AccessControlListSpecAccessLevelScopedKind
- type AccessControlListSpecAccessLevelScopedResource
- type AccessControlListSpecRules
- type AccessControlListSpecSubjects
- type AccessLevelScope
- type AccessRules
- type CommandLineInterface
- func (res *CommandLineInterface) AsInstance() (*apiv1.ResourceInstance, error)
- func (res *CommandLineInterface) FromInstance(ri *apiv1.ResourceInstance) error
- func (res *CommandLineInterface) MarshalJSON() ([]byte, error)
- func (res *CommandLineInterface) PluralName() string
- func (res *CommandLineInterface) UnmarshalJSON(data []byte) error
- type CommandLineInterfaceSpec
- type CommandLineInterfaceSpecColumns
- type CommandLineInterfaceSpecNames
- type ResourceDefinition
- func (res *ResourceDefinition) AsInstance() (*apiv1.ResourceInstance, error)
- func (res *ResourceDefinition) FromInstance(ri *apiv1.ResourceInstance) error
- func (res *ResourceDefinition) MarshalJSON() ([]byte, error)
- func (res *ResourceDefinition) PluralName() string
- func (res *ResourceDefinition) UnmarshalJSON(data []byte) error
- type ResourceDefinitionSpec
- type ResourceDefinitionSpecReferences
- type ResourceDefinitionSpecReferencesFrom
- type ResourceDefinitionSpecReferencesFrom1
- type ResourceDefinitionSpecReferencesFromResources
- type ResourceDefinitionSpecReferencesToResources
- type ResourceDefinitionSpecScope
- type ResourceDefinitionSpecSubResources
- type ResourceDefinitionVersion
- func (res *ResourceDefinitionVersion) AsInstance() (*apiv1.ResourceInstance, error)
- func (res *ResourceDefinitionVersion) FromInstance(ri *apiv1.ResourceInstance) error
- func (res *ResourceDefinitionVersion) MarshalJSON() ([]byte, error)
- func (res *ResourceDefinitionVersion) PluralName() string
- func (res *ResourceDefinitionVersion) UnmarshalJSON(data []byte) error
- type ResourceDefinitionVersionSpec
- type ResourceGroup
- func (res *ResourceGroup) AsInstance() (*apiv1.ResourceInstance, error)
- func (res *ResourceGroup) FromInstance(ri *apiv1.ResourceInstance) error
- func (res *ResourceGroup) MarshalJSON() ([]byte, error)
- func (res *ResourceGroup) PluralName() string
- func (res *ResourceGroup) UnmarshalJSON(data []byte) error
Constants ¶
const (
AccessControlListResourceName = "accesscontrollists"
)
const (
CommandLineInterfaceResourceName = "commandlines"
)
const (
ResourceDefinitionResourceName = "resources"
)
const (
ResourceDefinitionVersionResourceName = "resourceversions"
)
const (
ResourceGroupResourceName = "groups"
)
Variables ¶
var ( AccessControlListCtx log.ContextField = "accessControlList" AccessControlListScopes = []string{"ResourceGroup"} )
var ( CommandLineInterfaceCtx log.ContextField = "commandLineInterface" CommandLineInterfaceScopes = []string{"ResourceGroup"} )
var ( ResourceDefinitionCtx log.ContextField = "resourceDefinition" ResourceDefinitionScopes = []string{"ResourceGroup"} )
var ( ResourceDefinitionVersionCtx log.ContextField = "resourceDefinitionVersion" ResourceDefinitionVersionScopes = []string{"ResourceGroup"} )
var ( ResourceGroupCtx log.ContextField = "resourceGroup" ResourceGroupScopes = []string{""} )
Functions ¶
func AccessControlListGVK ¶
func AccessControlListGVK() apiv1.GroupVersionKind
func CommandLineInterfaceGVK ¶
func CommandLineInterfaceGVK() apiv1.GroupVersionKind
func ResourceDefinitionGVK ¶
func ResourceDefinitionGVK() apiv1.GroupVersionKind
func ResourceDefinitionVersionGVK ¶
func ResourceDefinitionVersionGVK() apiv1.GroupVersionKind
func ResourceGroupGVK ¶
func ResourceGroupGVK() apiv1.GroupVersionKind
Types ¶
type AccessControlList ¶
type AccessControlList struct { apiv1.ResourceMeta Owner *apiv1.Owner `json:"owner"` Spec AccessControlListSpec `json:"spec"` }
AccessControlList Resource
func AccessControlListFromInstanceArray ¶
func AccessControlListFromInstanceArray(fromArray []*apiv1.ResourceInstance) ([]*AccessControlList, error)
AccessControlListFromInstanceArray converts a []*ResourceInstance to a []*AccessControlList
func NewAccessControlList ¶
func NewAccessControlList(name, scopeName string) *AccessControlList
NewAccessControlList creates an empty *AccessControlList
func (*AccessControlList) AsInstance ¶
func (res *AccessControlList) AsInstance() (*apiv1.ResourceInstance, error)
AsInstance converts a AccessControlList to a ResourceInstance
func (*AccessControlList) FromInstance ¶
func (res *AccessControlList) FromInstance(ri *apiv1.ResourceInstance) error
FromInstance converts a ResourceInstance to a AccessControlList
func (*AccessControlList) MarshalJSON ¶
func (res *AccessControlList) MarshalJSON() ([]byte, error)
MarshalJSON custom marshaller to handle sub resources
func (*AccessControlList) PluralName ¶
func (res *AccessControlList) PluralName() string
PluralName returns the plural name of the resource
func (*AccessControlList) UnmarshalJSON ¶
func (res *AccessControlList) UnmarshalJSON(data []byte) error
UnmarshalJSON custom unmarshaller to handle sub resources
type AccessControlListSpec ¶
type AccessControlListSpec struct { Rules []AccessRules `json:"rules,omitempty"` Subjects []apiv1.Owner `json:"subjects,omitempty"` }
AccessControlListSpec struct for AccessControlListSpec
type AccessControlListSpecAccessLevelScope ¶
type AccessControlListSpecAccessLevelScope struct { // Resource level at which access is being granted. Level string `json:"level,omitempty"` // Set true to allow users to create scoped resources. AllowCreateScoped bool `json:"allowCreateScoped,omitempty"` // Set true to allow users to delete the unscoped resource. AllowDelete bool `json:"allowDelete,omitempty"` // Set true to allow users to update the unscoped resource. AllowWrite bool `json:"allowWrite,omitempty"` }
AccessControlListSpecAccessLevelScope struct for AccessControlListSpecAccessLevelScope
type AccessControlListSpecAccessLevelScopedKind ¶ added in v1.1.35
type AccessControlListSpecAccessLevelScopedKind struct { // Resource level at which access is being granted. Level string `json:"level,omitempty"` // The kind of scoped resources to provide access to or \"*\" for all kinds. Kind string `json:"kind"` // Set true to allow users to create scoped resources of the specified kind. AllowCreate bool `json:"allowCreate,omitempty"` // Set true to allow users to delete scoped resources of the specified kind. AllowDelete bool `json:"allowDelete,omitempty"` // Set true to allow users to update scoped resources of the specified kind. AllowWrite bool `json:"allowWrite,omitempty"` }
AccessControlListSpecAccessLevelScopedKind struct for AccessControlListSpecAccessLevelScopedKind
type AccessControlListSpecAccessLevelScopedResource ¶ added in v1.1.35
type AccessControlListSpecAccessLevelScopedResource struct { // Resource level at which access is being granted. Level string `json:"level,omitempty"` // The kind of scoped resources to provide access. Kind string `json:"kind"` // The name of the scoped resource to provide access to. Name string `json:"name"` // Set true to allow users to delete the referenced scoped resource. AllowDelete bool `json:"allowDelete,omitempty"` // Set true to allow users to update the referenced scoped resource. AllowWrite bool `json:"allowWrite,omitempty"` }
AccessControlListSpecAccessLevelScopedResource struct for AccessControlListSpecAccessLevelScopedResource
type AccessControlListSpecRules ¶
type AccessControlListSpecRules struct {
// GENERATE: The following code has been modified after code generation
Access []interface{} `json:"access,omitempty"`
}
AccessControlListSpecRules (definitions.v1alpha1.AccessControlList)
type AccessControlListSpecSubjects ¶
type AccessControlListSpecSubjects struct { // Type of the subject Type string `json:"type,omitempty"` // ID of the subject Id string `json:"id,omitempty"` }
AccessControlListSpecSubjects (definitions.v1alpha1.AccessControlList)
type AccessLevelScope ¶
type AccessLevelScope struct { // Resource level at which access is being granted. Level string `json:"level,omitempty"` }
AccessLevelScope struct for AccessLevelScope
type AccessRules ¶
type AccessRules struct { // Resource level at which access is being granted. Access []AccessLevelScope `json:"access,omitempty"` }
AccessRules struct for AccessRules
type CommandLineInterface ¶
type CommandLineInterface struct { apiv1.ResourceMeta Owner *apiv1.Owner `json:"owner"` Spec CommandLineInterfaceSpec `json:"spec"` }
CommandLineInterface Resource
func CommandLineInterfaceFromInstanceArray ¶
func CommandLineInterfaceFromInstanceArray(fromArray []*apiv1.ResourceInstance) ([]*CommandLineInterface, error)
CommandLineInterfaceFromInstanceArray converts a []*ResourceInstance to a []*CommandLineInterface
func NewCommandLineInterface ¶
func NewCommandLineInterface(name, scopeName string) *CommandLineInterface
NewCommandLineInterface creates an empty *CommandLineInterface
func (*CommandLineInterface) AsInstance ¶
func (res *CommandLineInterface) AsInstance() (*apiv1.ResourceInstance, error)
AsInstance converts a CommandLineInterface to a ResourceInstance
func (*CommandLineInterface) FromInstance ¶
func (res *CommandLineInterface) FromInstance(ri *apiv1.ResourceInstance) error
FromInstance converts a ResourceInstance to a CommandLineInterface
func (*CommandLineInterface) MarshalJSON ¶
func (res *CommandLineInterface) MarshalJSON() ([]byte, error)
MarshalJSON custom marshaller to handle sub resources
func (*CommandLineInterface) PluralName ¶
func (res *CommandLineInterface) PluralName() string
PluralName returns the plural name of the resource
func (*CommandLineInterface) UnmarshalJSON ¶
func (res *CommandLineInterface) UnmarshalJSON(data []byte) error
UnmarshalJSON custom unmarshaller to handle sub resources
type CommandLineInterfaceSpec ¶
type CommandLineInterfaceSpec struct { // A reference to a resource definition. ResourceDefinition string `json:"resourceDefinition"` Names CommandLineInterfaceSpecNames `json:"names,omitempty"` // Defines an ordered list of the columns and data to be rendered using a table output. Columns []CommandLineInterfaceSpecColumns `json:"columns"` }
CommandLineInterfaceSpec (definitions.v1alpha1.CommandLineInterface)
type CommandLineInterfaceSpecColumns ¶
type CommandLineInterfaceSpecColumns struct { // The name of the column for the resource. Name string `json:"name"` // The type of the column. Type string `json:"type"` // The JSONPath used to fetch data for the column starting from the root. JsonPath string `json:"jsonPath"` // The description of the column data. Description string `json:"description,omitempty"` }
CommandLineInterfaceSpecColumns (definitions.v1alpha1.CommandLineInterface)
type CommandLineInterfaceSpecNames ¶
type CommandLineInterfaceSpecNames struct { // Defines the name used to access resources in this group. Also provided as default in the autocomplete for listing commands. Plural string `json:"plural"` // Defines the name used to access a resource in this group. Also provided as default in the autocomplete for single resource access commands. Singular string `json:"singular"` // Defines the short names that the cli can use to fetch a resource in the group. ShortNames []string `json:"shortNames"` // Defines the short names alias that the cli can use to fetch a resource in the group. ShortNamesAlias []string `json:"shortNamesAlias,omitempty"` }
CommandLineInterfaceSpecNames (definitions.v1alpha1.CommandLineInterface)
type ResourceDefinition ¶
type ResourceDefinition struct { apiv1.ResourceMeta Owner *apiv1.Owner `json:"owner"` Spec ResourceDefinitionSpec `json:"spec"` }
ResourceDefinition Resource
func NewResourceDefinition ¶
func NewResourceDefinition(name, scopeName string) *ResourceDefinition
NewResourceDefinition creates an empty *ResourceDefinition
func ResourceDefinitionFromInstanceArray ¶
func ResourceDefinitionFromInstanceArray(fromArray []*apiv1.ResourceInstance) ([]*ResourceDefinition, error)
ResourceDefinitionFromInstanceArray converts a []*ResourceInstance to a []*ResourceDefinition
func (*ResourceDefinition) AsInstance ¶
func (res *ResourceDefinition) AsInstance() (*apiv1.ResourceInstance, error)
AsInstance converts a ResourceDefinition to a ResourceInstance
func (*ResourceDefinition) FromInstance ¶
func (res *ResourceDefinition) FromInstance(ri *apiv1.ResourceInstance) error
FromInstance converts a ResourceInstance to a ResourceDefinition
func (*ResourceDefinition) MarshalJSON ¶
func (res *ResourceDefinition) MarshalJSON() ([]byte, error)
MarshalJSON custom marshaller to handle sub resources
func (*ResourceDefinition) PluralName ¶
func (res *ResourceDefinition) PluralName() string
PluralName returns the plural name of the resource
func (*ResourceDefinition) UnmarshalJSON ¶
func (res *ResourceDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON custom unmarshaller to handle sub resources
type ResourceDefinitionSpec ¶
type ResourceDefinitionSpec struct { // Value used in the endpoint path for accessing the resource. Plural string `json:"plural"` // Defines the kind of the resource. The server infers this from the endpoint the client submits the request to. Kind string `json:"kind"` Scope ResourceDefinitionSpecScope `json:"scope,omitempty"` QueryParams []string `json:"queryParams,omitempty"` SubResources ResourceDefinitionSpecSubResources `json:"subResources,omitempty"` References ResourceDefinitionSpecReferences `json:"references,omitempty"` }
ResourceDefinitionSpec (definitions.v1alpha1.ResourceDefinition)
type ResourceDefinitionSpecReferences ¶
type ResourceDefinitionSpecReferences struct { // A list of resources that the current resources has references to. ToResources []ResourceDefinitionSpecReferencesToResources `json:"toResources,omitempty"` // A list of resources that the current resources is beging referenced from. FromResources []ResourceDefinitionSpecReferencesFromResources `json:"fromResources,omitempty"` }
ResourceDefinitionSpecReferences (definitions.v1alpha1.ResourceDefinition)
type ResourceDefinitionSpecReferencesFrom ¶
type ResourceDefinitionSpecReferencesFrom struct { // Defines the subResource which is referring to the resource. Omit for non subResource references. SubResourceName string `json:"subResourceName,omitempty"` }
ResourceDefinitionSpecReferencesFrom (definitions.v1alpha1.ResourceDefinition)
type ResourceDefinitionSpecReferencesFrom1 ¶
type ResourceDefinitionSpecReferencesFrom1 struct { // Defines the subResource referencing this resource. Omit for non subResource references. SubResourceName string `json:"subResourceName,omitempty"` }
ResourceDefinitionSpecReferencesFrom1 (definitions.v1alpha1.ResourceDefinition)
type ResourceDefinitionSpecReferencesFromResources ¶
type ResourceDefinitionSpecReferencesFromResources struct { // Defines the kind of the resource. Group string `json:"group,omitempty"` // Defines the kind of the resource. Kind string `json:"kind,omitempty"` // Defines the scope kind of the resource. Omit for unscoped resources. ScopeKind string `json:"scopeKind,omitempty"` From ResourceDefinitionSpecReferencesFrom1 `json:"from,omitempty"` // The type of the reference. Types []string `json:"types,omitempty"` }
ResourceDefinitionSpecReferencesFromResources (definitions.v1alpha1.ResourceDefinition)
type ResourceDefinitionSpecReferencesToResources ¶
type ResourceDefinitionSpecReferencesToResources struct { // Defines the kind of the resource. Group string `json:"group,omitempty"` // Defines the kind of the resource. Kind string `json:"kind,omitempty"` // Defines the scope kind of the resource. Omit for unscoped resources. ScopeKind string `json:"scopeKind,omitempty"` // The type of the reference. Types []string `json:"types,omitempty"` From ResourceDefinitionSpecReferencesFrom `json:"from,omitempty"` }
ResourceDefinitionSpecReferencesToResources (definitions.v1alpha1.ResourceDefinition)
type ResourceDefinitionSpecScope ¶
type ResourceDefinitionSpecScope struct { // Defines the kind of the scope. The server infers this from the endpoint the client submits the request to. Kind string `json:"kind,omitempty"` }
ResourceDefinitionSpecScope (definitions.v1alpha1.ResourceDefinition)
type ResourceDefinitionSpecSubResources ¶
type ResourceDefinitionSpecSubResources struct {
Names []string `json:"names,omitempty"`
}
ResourceDefinitionSpecSubResources Describes the subresources that the current resource might have. (definitions.v1alpha1.ResourceDefinition)
type ResourceDefinitionVersion ¶
type ResourceDefinitionVersion struct { apiv1.ResourceMeta Owner *apiv1.Owner `json:"owner"` Spec ResourceDefinitionVersionSpec `json:"spec"` }
ResourceDefinitionVersion Resource
func NewResourceDefinitionVersion ¶
func NewResourceDefinitionVersion(name, scopeName string) *ResourceDefinitionVersion
NewResourceDefinitionVersion creates an empty *ResourceDefinitionVersion
func ResourceDefinitionVersionFromInstanceArray ¶
func ResourceDefinitionVersionFromInstanceArray(fromArray []*apiv1.ResourceInstance) ([]*ResourceDefinitionVersion, error)
ResourceDefinitionVersionFromInstanceArray converts a []*ResourceInstance to a []*ResourceDefinitionVersion
func (*ResourceDefinitionVersion) AsInstance ¶
func (res *ResourceDefinitionVersion) AsInstance() (*apiv1.ResourceInstance, error)
AsInstance converts a ResourceDefinitionVersion to a ResourceInstance
func (*ResourceDefinitionVersion) FromInstance ¶
func (res *ResourceDefinitionVersion) FromInstance(ri *apiv1.ResourceInstance) error
FromInstance converts a ResourceInstance to a ResourceDefinitionVersion
func (*ResourceDefinitionVersion) MarshalJSON ¶
func (res *ResourceDefinitionVersion) MarshalJSON() ([]byte, error)
MarshalJSON custom marshaller to handle sub resources
func (*ResourceDefinitionVersion) PluralName ¶
func (res *ResourceDefinitionVersion) PluralName() string
PluralName returns the plural name of the resource
func (*ResourceDefinitionVersion) UnmarshalJSON ¶
func (res *ResourceDefinitionVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON custom unmarshaller to handle sub resources
type ResourceDefinitionVersionSpec ¶
type ResourceDefinitionVersionSpec struct { // A reference to a resource definition. ResourceDefinition string `json:"resourceDefinition"` // The name of the version to be used in the resource definition. Name string `json:"name"` // Defines if this version is currently served by the server. Served bool `json:"served"` // Defines if this version is used when storing the resource instance details. Storage bool `json:"storage"` // Defines the strucure of the spec for this resource version. (definitions.v1alpha1.ResourceDefinitionVersion) Spec map[string]interface{} `json:"spec,omitempty"` }
ResourceDefinitionVersionSpec (definitions.v1alpha1.ResourceDefinitionVersion)
type ResourceGroup ¶
type ResourceGroup struct { apiv1.ResourceMeta Owner *apiv1.Owner `json:"owner"` Spec interface{} `json:"spec"` }
ResourceGroup Resource
func NewResourceGroup ¶
func NewResourceGroup(name string) *ResourceGroup
NewResourceGroup creates an empty *ResourceGroup
func ResourceGroupFromInstanceArray ¶
func ResourceGroupFromInstanceArray(fromArray []*apiv1.ResourceInstance) ([]*ResourceGroup, error)
ResourceGroupFromInstanceArray converts a []*ResourceInstance to a []*ResourceGroup
func (*ResourceGroup) AsInstance ¶
func (res *ResourceGroup) AsInstance() (*apiv1.ResourceInstance, error)
AsInstance converts a ResourceGroup to a ResourceInstance
func (*ResourceGroup) FromInstance ¶
func (res *ResourceGroup) FromInstance(ri *apiv1.ResourceInstance) error
FromInstance converts a ResourceInstance to a ResourceGroup
func (*ResourceGroup) MarshalJSON ¶
func (res *ResourceGroup) MarshalJSON() ([]byte, error)
MarshalJSON custom marshaller to handle sub resources
func (*ResourceGroup) PluralName ¶
func (res *ResourceGroup) PluralName() string
PluralName returns the plural name of the resource
func (*ResourceGroup) UnmarshalJSON ¶
func (res *ResourceGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON custom unmarshaller to handle sub resources
Source Files ¶
- AccessControlList.go
- CommandLineInterface.go
- ResourceDefinition.go
- ResourceDefinitionVersion.go
- ResourceGroup.go
- model_access_control_list_spec.go
- model_access_control_list_spec_access_level_scope.go
- model_access_control_list_spec_access_level_scoped_kind.go
- model_access_control_list_spec_access_level_scoped_resource.go
- model_access_control_list_spec_rules.go
- model_access_control_list_spec_subjects.go
- model_command_line_interface_spec.go
- model_command_line_interface_spec_columns.go
- model_command_line_interface_spec_names.go
- model_resource_definition_spec.go
- model_resource_definition_spec_references.go
- model_resource_definition_spec_references_from.go
- model_resource_definition_spec_references_from_1.go
- model_resource_definition_spec_references_from_resources.go
- model_resource_definition_spec_references_to_resources.go
- model_resource_definition_spec_scope.go
- model_resource_definition_spec_sub_resources.go
- model_resource_definition_version_spec.go