Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func CredentialsFromEnvVar(ctx context.Context, name string) (*google.Credentials, error)
 - func CredentialsFromFile(ctx context.Context, path string) (*google.Credentials, error)
 - func CredentialsFromGcloud(ctx context.Context) (*google.Credentials, error)
 - func CredentialsFromString(ctx context.Context, content string) (*google.Credentials, error)
 - type Config
 - type GCS
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  var (
	ErrCredentialsEmpty = errors.New("credentials is empty")
)
    error list
Functions ¶
func CredentialsFromEnvVar ¶
CredentialsFromEnvVar return content of credentials from environment variable
func CredentialsFromFile ¶
CredentialsFromFile return content of credentials from file
func CredentialsFromGcloud ¶
func CredentialsFromGcloud(ctx context.Context) (*google.Credentials, error)
CredentialsFromGcloud to provide credentials form default gcloud command
func CredentialsFromString ¶
CredentialsFromString if user want to load credentials by their own
Types ¶
type Config ¶
type Config struct {
	Bucket      string
	BucketProto string
	BucketURL   string
	// contains filtered or unexported fields
}
    Config of Google Cloud Storage
func (*Config) SetBucketProto ¶
SetBucketProto set bucket protocol
func (*Config) SetBucketURL ¶
SetBucketURL set bucket URL
type GCS ¶
type GCS struct {
	// contains filtered or unexported fields
}
    GCS struct
func New ¶
New gcs storage gcs storage expect user already authenticated using 'gcs' command json path is a path to json service account path
func (*GCS) BucketName ¶
BucketName return name of bucket used for objectstorage
 Click to show internal directories. 
   Click to hide internal directories.