Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provisioner ¶
type Provisioner struct { Service *iam.Service // contains filtered or unexported fields }
Provisioner is a GCP service account key provisioner. It creates new svc-keys and deletes old svc-keys if enabled.
func NewProvisioner ¶
func NewProvisioner(enableDeletion bool) (*Provisioner, error)
NewProvisioner creates a new svc-key provisioner with a new iam service. The argument 'enableDeletion' specifies if deletion of old svc-keys is enabled. It returns a pointer to the new provisioner and any error if encountered.
func (*Provisioner) CreateNew ¶
CreateNew provisions a new service account key, returns the key-id and private-key data of the created key if successful, otherwise returns error
func (*Provisioner) Deactivate ¶
func (p *Provisioner) Deactivate(labels map[string]string, version string) error
Deactivate deletes an existing service account key specified by labels and version, returns nil if successful, otherwise error
type ServiceAccountKeySpec ¶
type ServiceAccountKeySpec struct { Project string `yaml:"project"` ServiceAccount string `yaml:"serviceAccount"` }
func (ServiceAccountKeySpec) Labels ¶
func (svc ServiceAccountKeySpec) Labels() map[string]string
Labels is used to obtain the labels needed for the provisioner of the ServiceAccountKey
func (ServiceAccountKeySpec) String ¶
func (svc ServiceAccountKeySpec) String() string
func (ServiceAccountKeySpec) Type ¶
func (svc ServiceAccountKeySpec) Type() string
Type is used to obtain the provisioner of the ServiceAccountKey
func (*ServiceAccountKeySpec) Validate ¶
func (svc *ServiceAccountKeySpec) Validate() error
Validate return error if 'project' and/or 'service-account' fields are missing