Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds gcp client
func (*Client) GetCredentials ¶
func (x *Client) GetCredentials() *google.Credentials
GetCredentials returns google credentials
func (*Client) GetTokenOption ¶
func (x *Client) GetTokenOption(ctx context.Context) option.ClientOption
GetTokenOption returns creds as ClientOption
type Config ¶
type Config struct { Project string `json:"project" yaml:"project"` Location string `json:"location" yaml:"location"` Zone string `json:"zone" yaml:"zone"` Scopes string `json:"scopes" yaml:"scopes"` RequestReason string `json:"request_reason" yaml:"request_reason"` Endpoints map[string]string `json:"endpoints" yaml:"endpoints"` CredentialsFile string `json:"credentials_file" yaml:"credentials_file"` Credentials string `json:"credentials" yaml:"credentials"` }
Config struct
type Option ¶
Option for Client
func WithConfig ¶
WithConfig is an option to configure Client Config via Config struct.
func WithConfigData ¶
WithConfigData is an option to configure Client Config
func WithConfigMap ¶
WithConfigMap is an option to configure Client Config
func WithConfigMapFunc ¶
WithConfigMapFunc is an option to configure Client Config
func WithEnv ¶
func WithEnv() Option
WithEnv is an option to configure Client Config via env variables
func WithEnvPrefix ¶
WithEnvPrefix is an option to configure Client Config via env variables with prefix
Click to show internal directories.
Click to hide internal directories.