client

package
v0.0.0-...-09c7457 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Config() *config.Config
	Upload(content []byte, name string) error
	Delete(name string) error
}

func NewGCSClient

func NewGCSClient(cfg *config.Config) (Client, error)

func NewLocalClient

func NewLocalClient(target string, create bool) (Client, error)

Creates a new LocalClient to write to the target directory

type GCSClient

type GCSClient struct {
	Client

	GcsClient *storage.Client
	Bucket    *storage.BucketHandle
	// contains filtered or unexported fields
}

func (*GCSClient) Config

func (gcs *GCSClient) Config() *config.Config

func (*GCSClient) Delete

func (gcs *GCSClient) Delete(name string) error

func (*GCSClient) Upload

func (gcs *GCSClient) Upload(content []byte, name string) error

type LocalClient

type LocalClient struct {
	Client
	// contains filtered or unexported fields
}

func (*LocalClient) Delete

func (c *LocalClient) Delete(name string) error

func (*LocalClient) Upload

func (c *LocalClient) Upload(content []byte, name string) error

type PermissionError

type PermissionError struct {
	Required []string
	Allowed  []string
	// contains filtered or unexported fields
}

func (*PermissionError) Error

func (e *PermissionError) Error() string

Jump to

Keyboard shortcuts

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