account_managers

package
v3.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceAccountName

func ServiceAccountName(bindingId string) string

XXX names are truncated to 20 characters because of a bug in the IAM service

Types

type ServiceAccountInfo

type ServiceAccountInfo struct {
	// the bits to save
	Name      string
	Email     string
	UniqueId  string
	ProjectId string

	// the bit to return
	PrivateKeyData string
}

type ServiceAccountManager

type ServiceAccountManager struct {
	ProjectId string
	GCPClient *http.Client
}

func (*ServiceAccountManager) BuildInstanceCredentials

func (b *ServiceAccountManager) BuildInstanceCredentials(bindDetails map[string]string, instanceDetails map[string]string) map[string]string

func (*ServiceAccountManager) CreateAccountInGoogle

func (sam *ServiceAccountManager) CreateAccountInGoogle(instanceID string, bindingID string, details models.BindDetails, instance models.ServiceInstanceDetails) (models.ServiceBindingCredentials, error)

creates a new service account for the given binding id with the role listed in details.Parameters["role"]

func (*ServiceAccountManager) DeleteAccountFromGoogle

func (sam *ServiceAccountManager) DeleteAccountFromGoogle(binding models.ServiceBindingCredentials) error

deletes the given service account from Google

type SqlAccountInfo

type SqlAccountInfo struct {
	// the bits to return
	Username   string
	Password   string
	CaCert     string
	ClientCert string
	ClientKey  string

	// the bits to save
	Sha1Fingerprint string
}

type SqlAccountManager

type SqlAccountManager struct {
	GCPClient *http.Client
	ProjectId string
}

func (*SqlAccountManager) BuildInstanceCredentials

func (b *SqlAccountManager) BuildInstanceCredentials(bindDetails map[string]string, instanceDetails map[string]string) map[string]string

func (*SqlAccountManager) CreateAccountInGoogle

func (sam *SqlAccountManager) CreateAccountInGoogle(instanceID string, bindingID string, details models.BindDetails, instance models.ServiceInstanceDetails) (models.ServiceBindingCredentials, error)

inserts a new user into the database and creates new ssl certs

func (*SqlAccountManager) DeleteAccountFromGoogle

func (sam *SqlAccountManager) DeleteAccountFromGoogle(binding models.ServiceBindingCredentials) error

deletes the user from the database and invalidates the associated ssl certs

Jump to

Keyboard shortcuts

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