service_account

package
v0.0.0-...-3d8ba93 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceAccountType = "service-account"

Variables

This section is empty.

Functions

func FromTrait

func FromTrait(from common.ApplicationTrait) (apis.Trait, error)

Types

type NullablePrivileges

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

func NewNullablePrivileges

func NewNullablePrivileges(val *Privileges) *NullablePrivileges

func (*NullablePrivileges) Get

func (v *NullablePrivileges) Get() *Privileges

func (*NullablePrivileges) IsSet

func (v *NullablePrivileges) IsSet() bool

func (NullablePrivileges) MarshalJSON

func (v NullablePrivileges) MarshalJSON() ([]byte, error)

func (*NullablePrivileges) Set

func (v *NullablePrivileges) Set(val *Privileges)

func (*NullablePrivileges) UnmarshalJSON

func (v *NullablePrivileges) UnmarshalJSON(src []byte) error

func (*NullablePrivileges) Unset

func (v *NullablePrivileges) Unset()

type NullableServiceAccountSpec

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

func NewNullableServiceAccountSpec

func NewNullableServiceAccountSpec(val *ServiceAccountSpec) *NullableServiceAccountSpec

func (*NullableServiceAccountSpec) Get

func (*NullableServiceAccountSpec) IsSet

func (v *NullableServiceAccountSpec) IsSet() bool

func (NullableServiceAccountSpec) MarshalJSON

func (v NullableServiceAccountSpec) MarshalJSON() ([]byte, error)

func (*NullableServiceAccountSpec) Set

func (*NullableServiceAccountSpec) UnmarshalJSON

func (v *NullableServiceAccountSpec) UnmarshalJSON(src []byte) error

func (*NullableServiceAccountSpec) Unset

func (v *NullableServiceAccountSpec) Unset()

type Privileges

type Privileges struct {
	// Specify the apiGroups of the resource
	ApiGroups []string `json:"apiGroups,omitempty"`
	// Specify the resource url to be allowed
	NonResourceURLs []string `json:"nonResourceURLs,omitempty"`
	// Specify the resourceNames to be allowed
	ResourceNames []string `json:"resourceNames,omitempty"`
	// Specify the resources to be allowed
	Resources []string `json:"resources,omitempty"`
	// Specify the scope of the privileges, default to be namespace scope
	Scope *string `json:"scope"`
	// Specify the verbs to be allowed for the resource
	Verbs []string `json:"verbs"`
}

Privileges struct for Privileges

func NewPrivileges

func NewPrivileges() *Privileges

NewPrivileges is short for NewPrivilegesWithDefault which instantiates a new Privileges object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewPrivilegesEmpty

func NewPrivilegesEmpty() *Privileges

NewPrivilegesEmpty instantiates a new Privileges object with no properties set. This constructor will not assign any default values to properties.

func NewPrivilegesList

func NewPrivilegesList(ps ...*Privileges) []Privileges

NewPrivilegess converts a list Privileges pointers to objects. This is helpful when the SetPrivileges requires a list of objects

func NewPrivilegesWith

func NewPrivilegesWith(scope string, verbs []string) *Privileges

NewPrivilegesWith instantiates a new Privileges object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewPrivilegesWithDefault

func NewPrivilegesWithDefault() *Privileges

NewPrivilegesWithDefault instantiates a new Privileges object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Privileges) GetApiGroups

func (o *Privileges) GetApiGroups() []string

GetApiGroups returns the ApiGroups field value if set, zero value otherwise.

func (*Privileges) GetApiGroupsOk

func (o *Privileges) GetApiGroupsOk() ([]string, bool)

GetApiGroupsOk returns a tuple with the ApiGroups field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Privileges) GetNonResourceURLs

func (o *Privileges) GetNonResourceURLs() []string

GetNonResourceURLs returns the NonResourceURLs field value if set, zero value otherwise.

func (*Privileges) GetNonResourceURLsOk

func (o *Privileges) GetNonResourceURLsOk() ([]string, bool)

GetNonResourceURLsOk returns a tuple with the NonResourceURLs field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Privileges) GetResourceNames

func (o *Privileges) GetResourceNames() []string

GetResourceNames returns the ResourceNames field value if set, zero value otherwise.

func (*Privileges) GetResourceNamesOk

func (o *Privileges) GetResourceNamesOk() ([]string, bool)

GetResourceNamesOk returns a tuple with the ResourceNames field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Privileges) GetResources

func (o *Privileges) GetResources() []string

GetResources returns the Resources field value if set, zero value otherwise.

func (*Privileges) GetResourcesOk

func (o *Privileges) GetResourcesOk() ([]string, bool)

GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Privileges) GetScope

func (o *Privileges) GetScope() string

GetScope returns the Scope field value

func (*Privileges) GetScopeOk

func (o *Privileges) GetScopeOk() (*string, bool)

GetScopeOk returns a tuple with the Scope field value and a boolean to check if the value has been set.

func (*Privileges) GetVerbs

func (o *Privileges) GetVerbs() []string

GetVerbs returns the Verbs field value

func (*Privileges) GetVerbsOk

func (o *Privileges) GetVerbsOk() ([]string, bool)

GetVerbsOk returns a tuple with the Verbs field value and a boolean to check if the value has been set.

func (*Privileges) HasApiGroups

func (o *Privileges) HasApiGroups() bool

HasApiGroups returns a boolean if a field has been set.

func (*Privileges) HasNonResourceURLs

func (o *Privileges) HasNonResourceURLs() bool

HasNonResourceURLs returns a boolean if a field has been set.

func (*Privileges) HasResourceNames

func (o *Privileges) HasResourceNames() bool

HasResourceNames returns a boolean if a field has been set.

func (*Privileges) HasResources

func (o *Privileges) HasResources() bool

HasResources returns a boolean if a field has been set.

func (Privileges) MarshalJSON

func (o Privileges) MarshalJSON() ([]byte, error)

func (*Privileges) SetApiGroups

func (o *Privileges) SetApiGroups(v []string) *Privileges

SetApiGroups gets a reference to the given []string and assigns it to the apiGroups field. ApiGroups: Specify the apiGroups of the resource

func (*Privileges) SetNonResourceURLs

func (o *Privileges) SetNonResourceURLs(v []string) *Privileges

SetNonResourceURLs gets a reference to the given []string and assigns it to the nonResourceURLs field. NonResourceURLs: Specify the resource url to be allowed

func (*Privileges) SetResourceNames

func (o *Privileges) SetResourceNames(v []string) *Privileges

SetResourceNames gets a reference to the given []string and assigns it to the resourceNames field. ResourceNames: Specify the resourceNames to be allowed

func (*Privileges) SetResources

func (o *Privileges) SetResources(v []string) *Privileges

SetResources gets a reference to the given []string and assigns it to the resources field. Resources: Specify the resources to be allowed

func (*Privileges) SetScope

func (o *Privileges) SetScope(v string) *Privileges

SetScope sets field value

func (*Privileges) SetVerbs

func (o *Privileges) SetVerbs(v []string) *Privileges

SetVerbs sets field value

func (Privileges) ToMap

func (o Privileges) ToMap() (map[string]interface{}, error)

func (*Privileges) Validate

func (o *Privileges) Validate() error

Validate validates this Privileges 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type ServiceAccountSpec

type ServiceAccountSpec struct {
	// Specify whether to create new ServiceAccount or not
	Create *bool `json:"create"`
	// Specify the name of ServiceAccount
	Name *string `json:"name"`
	// Specify the privileges of the ServiceAccount, if not empty, RoleBindings(ClusterRoleBindings) will be created
	Privileges []Privileges `json:"privileges,omitempty"`
}

ServiceAccountSpec struct for ServiceAccountSpec

func NewServiceAccountSpec

func NewServiceAccountSpec() *ServiceAccountSpec

NewServiceAccountSpec is short for NewServiceAccountSpecWithDefault which instantiates a new ServiceAccountSpec object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewServiceAccountSpecEmpty

func NewServiceAccountSpecEmpty() *ServiceAccountSpec

NewServiceAccountSpecEmpty instantiates a new ServiceAccountSpec object with no properties set. This constructor will not assign any default values to properties.

func NewServiceAccountSpecList

func NewServiceAccountSpecList(ps ...*ServiceAccountSpec) []ServiceAccountSpec

NewServiceAccountSpecs converts a list ServiceAccountSpec pointers to objects. This is helpful when the SetServiceAccountSpec requires a list of objects

func NewServiceAccountSpecWith

func NewServiceAccountSpecWith(create bool, name string) *ServiceAccountSpec

NewServiceAccountSpecWith instantiates a new ServiceAccountSpec object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewServiceAccountSpecWithDefault

func NewServiceAccountSpecWithDefault() *ServiceAccountSpec

NewServiceAccountSpecWithDefault instantiates a new ServiceAccountSpec object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (ServiceAccountSpec) MarshalJSON

func (o ServiceAccountSpec) MarshalJSON() ([]byte, error)

func (ServiceAccountSpec) ToMap

func (o ServiceAccountSpec) ToMap() (map[string]interface{}, error)

type ServiceAccountTrait

type ServiceAccountTrait struct {
	Base       apis.TraitBase
	Properties ServiceAccountSpec
}

func ServiceAccount

func ServiceAccount() *ServiceAccountTrait

func (*ServiceAccountTrait) Build

func (*ServiceAccountTrait) DefType

func (s *ServiceAccountTrait) DefType() string

func (*ServiceAccountTrait) FromTrait

func (*ServiceAccountTrait) GetCreate

func (o *ServiceAccountTrait) GetCreate() bool

GetCreate returns the Create field value

func (*ServiceAccountTrait) GetCreateOk

func (o *ServiceAccountTrait) GetCreateOk() (*bool, bool)

GetCreateOk returns a tuple with the Create field value and a boolean to check if the value has been set.

func (*ServiceAccountTrait) GetName

func (o *ServiceAccountTrait) GetName() string

GetName returns the Name field value

func (*ServiceAccountTrait) GetNameOk

func (o *ServiceAccountTrait) GetNameOk() (*string, bool)

GetNameOk returns a tuple with the Name field value and a boolean to check if the value has been set.

func (*ServiceAccountTrait) GetPrivileges

func (o *ServiceAccountTrait) GetPrivileges() []Privileges

GetPrivileges returns the Privileges field value if set, zero value otherwise.

func (*ServiceAccountTrait) GetPrivilegesOk

func (o *ServiceAccountTrait) GetPrivilegesOk() ([]Privileges, bool)

GetPrivilegesOk returns a tuple with the Privileges field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ServiceAccountTrait) HasPrivileges

func (o *ServiceAccountTrait) HasPrivileges() bool

HasPrivileges returns a boolean if a field has been set.

func (*ServiceAccountTrait) SetCreate

func (o *ServiceAccountTrait) SetCreate(v bool) *ServiceAccountTrait

SetCreate sets field value

func (*ServiceAccountTrait) SetName

SetName sets field value

func (*ServiceAccountTrait) SetPrivileges

func (o *ServiceAccountTrait) SetPrivileges(v []Privileges) *ServiceAccountTrait

SetPrivileges gets a reference to the given []Privileges and assigns it to the privileges field. Privileges: Specify the privileges of the ServiceAccount, if not empty, RoleBindings(ClusterRoleBindings) will be created

func (*ServiceAccountTrait) Validate

func (o *ServiceAccountTrait) Validate() error

Validate validates this ServiceAccountSpec 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

Jump to

Keyboard shortcuts

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