Documentation ¶
Index ¶
- Variables
- type Config
- type ServiceAccount
- type StorageClient
- func (s StorageClient) CreateBucket(ctx context.Context, bucketName string) error
- func (s StorageClient) ExistsObject(ctx context.Context, bucket, fileName string) (bool, error)
- func (s StorageClient) ListBuckets(ctx context.Context) ([]string, error)
- func (s StorageClient) ListOjbect(ctx context.Context, bucketName, path string) ([]string, error)
- func (s StorageClient) ReadObject(ctx context.Context, bucketName, fileName string) ([]byte, error)
- func (s StorageClient) WriteToObject(ctx context.Context, bucketName, fileName string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidServiceAccount = errors.New("invalid service account")
Functions ¶
This section is empty.
Types ¶
type ServiceAccount ¶
type ServiceAccount struct { Type string `json:"type"` ProjectID string `json:"project_id"` PrivateKeyID string `json:"private_key_id"` PrivateKey string `json:"private_key"` ClientEmail string `json:"client_email"` ClientID string `json:"client_id"` AuthURI string `json:"auth_uri"` TokenURI string `json:"token_uri"` AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"` ClientX509CertURL string `json:"client_x509_cert_url"` }
type StorageClient ¶
func (StorageClient) CreateBucket ¶
func (s StorageClient) CreateBucket(ctx context.Context, bucketName string) error
func (StorageClient) ExistsObject ¶
func (StorageClient) ListBuckets ¶
func (s StorageClient) ListBuckets(ctx context.Context) ([]string, error)
func (StorageClient) ListOjbect ¶
func (StorageClient) ReadObject ¶
func (StorageClient) WriteToObject ¶
Click to show internal directories.
Click to hide internal directories.