Documentation
¶
Index ¶
- func GuildBucket(guildId string) string
- type ObjectStorage
- func (o *ObjectStorage) Delete(ctx context.Context, bucketName, dir, filename string) error
- func (o *ObjectStorage) GetUrl(ctx context.Context, bucketName, dir, filename string, urlExpiry time.Duration, ...) (*url.URL, error)
- func (o *ObjectStorage) Save(ctx context.Context, bucketName, dir, filename string, data *bytes.Buffer, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GuildBucket ¶
Returns the name of the bucket for the given guild
Types ¶
type ObjectStorage ¶
type ObjectStorage struct {
// contains filtered or unexported fields
}
A simple abstraction for object storage
func New ¶
func New(c *config.ObjectStorageConfig) (o *ObjectStorage, err error)
func (*ObjectStorage) Delete ¶
func (o *ObjectStorage) Delete(ctx context.Context, bucketName, dir, filename string) error
Deletes a file
Click to show internal directories.
Click to hide internal directories.