bunny_storage

package
v4.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	driver.RootPath
	StorageZoneName   string `json:"storage_zone_name" required:"true"`
	AccessKey         string `json:"access_key" required:"true"`
	Endpoint          string `json:"endpoint" required:"true" default:"storage.bunnycdn.com"`
	CDNBaseURL        string `json:"cdn_base_url"`
	CDNTokenKey       string `json:"cdn_token_key"`
	CDNTokenMethod    string `json:"cdn_token_method" type:"select" options:"sha256,hmac_sha256" default:"sha256"`
	CDNTokenIncludeIP bool   `json:"cdn_token_include_ip" default:"false"`
	SignURLExpire     int    `json:"sign_url_expire" type:"number" default:"4"`
	Placeholder       string `json:"placeholder" default:".openlist"`
}

type BunnyStorage

type BunnyStorage struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*BunnyStorage) Config

func (d *BunnyStorage) Config() driver.Config

func (*BunnyStorage) Drop

func (d *BunnyStorage) Drop(ctx context.Context) error

func (*BunnyStorage) Get

func (d *BunnyStorage) Get(ctx context.Context, path string) (model.Obj, error)

func (*BunnyStorage) GetAddition

func (d *BunnyStorage) GetAddition() driver.Additional

func (*BunnyStorage) Init

func (d *BunnyStorage) Init(ctx context.Context) error
func (d *BunnyStorage) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*BunnyStorage) List

func (d *BunnyStorage) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*BunnyStorage) MakeDir

func (d *BunnyStorage) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)

func (*BunnyStorage) Put

func (*BunnyStorage) Remove

func (d *BunnyStorage) Remove(ctx context.Context, obj model.Obj) error

Jump to

Keyboard shortcuts

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