Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCPAuth ¶
type GCPAuth struct {
// contains filtered or unexported fields
}
func NewGCPAuth ¶
func NewGCPAuth(roleName string, opts ...LoginOption) (*GCPAuth, error)
NewGCPAuth initializes a new GCP auth method interface to be passed as a parameter to the client.Auth().Login method.
Supported options: WithMountPath, WithIAMAuth, WithGCEAuth
func (*GCPAuth) Login ¶
func (a *GCPAuth) Login(ctx context.Context, client *api.Client) (*api.Secret, error)
Login sets up the required request body for the GCP auth method's /login endpoint, and performs a write to it. This method defaults to the "gce" auth type unless NewGCPAuth is called with WithIAMAuth().
type LoginOption ¶
type LoginOption func(a *GCPAuth) error
func WithGCEAuth ¶
func WithGCEAuth() LoginOption
func WithIAMAuth ¶
func WithIAMAuth(serviceAccountEmail string) LoginOption
func WithMountPath ¶
func WithMountPath(mountPath string) LoginOption
Click to show internal directories.
Click to hide internal directories.