Documentation ¶
Index ¶
- func Create(ctx context.Context, cfg Config, rt http.RoundTripper) (restic.Backend, error)
- func Open(ctx context.Context, cfg Config, rt http.RoundTripper) (restic.Backend, error)
- func ParseConfig(s string) (interface{}, error)
- type Config
- type HwObs
- func (h *HwObs) Close() error
- func (h *HwObs) Delete(ctx context.Context) error
- func (h *HwObs) Hasher() hash.Hash
- func (h *HwObs) IsAccessDenied(err error) bool
- func (h *HwObs) IsNotExist(err error) bool
- func (be *HwObs) Join(p ...string) string
- func (h *HwObs) List(ctx context.Context, t restic.FileType, fn func(restic.FileInfo) error) error
- func (h *HwObs) Load(ctx context.Context, handle restic.Handle, length int, offset int64, ...) error
- func (h *HwObs) Location() string
- func (h *HwObs) ReadDir(ctx context.Context, dir string) (list []os.FileInfo, err error)
- func (h *HwObs) Remove(ctx context.Context, handle restic.Handle) error
- func (h *HwObs) Save(ctx context.Context, handle restic.Handle, rd restic.RewindReader) error
- func (h *HwObs) Stat(ctx context.Context, handle restic.Handle) (restic.FileInfo, error)
- func (h *HwObs) Test(ctx context.Context, handle restic.Handle) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseConfig ¶
ParseConfig parses the string s and extracts the obs config. The two supported configuration formats are obs://host/bucketname/prefix and obs:host/bucketname/prefix. The host can also be a valid obs region
Types ¶
type Config ¶
type Config struct { Endpoint string Ak string //*** Provide your Access Key *** Sk string //*** Provide your Secret Key *** BucketName string //bucket-test StorageClass string `option:"storage-class" help:"set OBS storage class (STANDARD, WARM, COLD)"` Connections uint Layout string `option:"layout" help:"use this backend layout (default: auto-detect)"` Prefix string SslEnable bool }
type HwObs ¶
func (*HwObs) IsAccessDenied ¶
IsAccessDenied returns true if the error is caused by Access Denied.
func (*HwObs) IsNotExist ¶
Click to show internal directories.
Click to hide internal directories.