Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg Config) (storagecore.Storage, error)
New constructs GCS-backed storage using cloud.google.com/go/storage. @group Driver Constructors
Example: gcs storage
fs, _ := gcsstorage.New(gcsstorage.Config{
Bucket: "uploads",
})
_ = fs
func NewContext ¶
Types ¶
type Config ¶
Config defines a GCS-backed storage disk. @group Driver Config
Example: define gcs storage config
cfg := gcsstorage.Config{
Bucket: "uploads",
}
_ = cfg
Example: define gcs storage config with all fields
cfg := gcsstorage.Config{
Bucket: "uploads",
CredentialsJSON: "{...}", // default: ""
Endpoint: "http://127.0.0.1:0", // default: ""
Prefix: "assets", // default: ""
}
_ = cfg
func (Config) DriverName ¶
func (Config) ResolvedConfig ¶
func (c Config) ResolvedConfig() storagecore.ResolvedConfig
Click to show internal directories.
Click to hide internal directories.