Documentation ¶
Index ¶
Constants ¶
View Source
const ( PermPublic = Perm("public") PermPrivate = Perm("private") PermTmp = Perm("tmp") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.2.0
type Config struct { ConfMapPath string `env:"GCP_CONF_MAP_PATH"` ModelDI ConfMap GcpConfigMap Log log.Logger }
func GetConfigFromEnv ¶ added in v1.2.0
type DownloadUrl ¶ added in v1.2.0
type GcpConf ¶
type GcpConf struct { CredentialsFile string `yaml:"credentailsFile"` CredentailsUrl string `yaml:"credentailsUrl"` Bucket string `yaml:"bucket"` }
func (*GcpConf) NewStorage ¶
func (gcp *GcpConf) NewStorage(ctx context.Context) (GcpStorage, error)
type GcpConfigMap ¶ added in v1.1.0
func LoadGcpConfigMap ¶ added in v1.1.0
func LoadGcpConfigMap(file string) (GcpConfigMap, error)
type GcpDI ¶
type GcpDI interface {
NewStorage(ctx context.Context, bucket string) (GcpStorage, error)
}
type GcpStorage ¶
type GcpStorage interface { Storage GetAttr(key string) (*googstorage.ObjectAttrs, error) GetDownloadUrl(key string) (myurl *DownloadUrl, err error) Write(key string, writeData func(w io.Writer) error) (path string, err error) OpenFile(key string) (io.Reader, error) SignedURL(key string, contentType string, expDuration time.Duration) (url string, err error) GetAccessToken() (*oauth2.Token, error) }
type GrpcGcpStorage ¶ added in v1.1.0
type GrpcGcpStorage interface { GcpStorage Close() }
func NewGrpcGcpStorage ¶ added in v1.1.0
type HdStorage ¶ added in v1.2.2
func NewHdStorage ¶
Click to show internal directories.
Click to hide internal directories.