Documentation ¶
Index ¶
- func ParseConfig(s string) (interface{}, error)
- type Backend
- func (be *Backend) Close() error
- func (be *Backend) Delete(ctx context.Context) error
- func (be *Backend) IsNotExist(err error) bool
- func (be *Backend) Join(p ...string) string
- func (be *Backend) List(ctx context.Context, t restic.FileType, fn func(restic.FileInfo) error) error
- func (be *Backend) Load(ctx context.Context, h restic.Handle, length int, offset int64, ...) error
- func (be *Backend) Location() string
- func (be *Backend) Path() string
- func (be *Backend) Remove(ctx context.Context, h restic.Handle) error
- func (be *Backend) Save(ctx context.Context, h restic.Handle, rd restic.RewindReader) error
- func (be *Backend) SetListMaxItems(i int)
- func (be *Backend) Stat(ctx context.Context, h restic.Handle) (restic.FileInfo, error)
- func (be *Backend) Test(ctx context.Context, h restic.Handle) (bool, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseConfig ¶
ParseConfig parses the string s and extracts the azure config. The configuration format is azure:containerName:/[prefix].
Types ¶
type Backend ¶
Backend stores data on an azure endpoint.
func Create ¶
func Create(cfg Config, rt http.RoundTripper) (*Backend, error)
Create opens the Azure backend at specified container and creates the container if it does not exist yet.
func Open ¶
func Open(cfg Config, rt http.RoundTripper) (*Backend, error)
Open opens the Azure backend at specified container.
func (*Backend) Delete ¶
Delete removes all restic keys in the bucket. It will not remove the bucket itself.
func (*Backend) IsNotExist ¶
IsNotExist returns true if the error is caused by a not existing file.
func (*Backend) List ¶
func (be *Backend) List(ctx context.Context, t restic.FileType, fn func(restic.FileInfo) error) error
List runs fn for each file in the backend which has the type t. When an error occurs (or fn returns an error), List stops and returns it.
func (*Backend) Load ¶
func (be *Backend) Load(ctx context.Context, h restic.Handle, length int, offset int64, fn func(rd io.Reader) error) error
Load runs fn with a reader that yields the contents of the file at h at the given offset.
func (*Backend) SetListMaxItems ¶ added in v0.7.3
SetListMaxItems sets the number of list items to load per request.
type Config ¶
type Config struct { AccountName string AccountKey string Container string Prefix string Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 20)"` }
Config contains all configuration necessary to connect to an azure compatible server.