Documentation ¶
Index ¶
- func Create(ctx context.Context, cfg Config, rt http.RoundTripper) (restic.Backend, error)
- func NewFactory() location.Factory
- func Open(ctx context.Context, cfg Config, rt http.RoundTripper) (restic.Backend, error)
- type Config
- type TxCos
- func (t *TxCos) Close() error
- func (t *TxCos) Connections() uint
- func (t *TxCos) Delete(ctx context.Context) error
- func (t *TxCos) HasAtomicReplace() bool
- func (t *TxCos) Hasher() hash.Hash
- func (t *TxCos) IsAccessDenied(err error) bool
- func (t *TxCos) IsNotExist(err error) bool
- func (be *TxCos) Join(p ...string) string
- func (t *TxCos) List(ctx context.Context, ty restic.FileType, fn func(restic.FileInfo) error) error
- func (t *TxCos) Load(ctx context.Context, handle restic.Handle, length int, offset int64, ...) error
- func (t *TxCos) Location() string
- func (t *TxCos) ReadDir(ctx context.Context, dir string) (list []os.FileInfo, err error)
- func (t *TxCos) Remove(ctx context.Context, handle restic.Handle) error
- func (t *TxCos) Save(ctx context.Context, handle restic.Handle, rd restic.RewindReader) error
- func (t *TxCos) Stat(ctx context.Context, handle restic.Handle) (restic.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶ added in v1.2.0
Types ¶
type Config ¶
type Config struct { Endpoint string //https://examplebucket-appid.cos.COS_REGION.myqcloud.com SecretID string //*** Provide your Access Key *** SecretKey string //*** Provide your Secret Key *** 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 EnableCRC bool //CRC64 校验 }
func NewConfig ¶
func NewConfig() Config
NewConfig returns a new Config with the default values filled in.
func ParseConfig ¶
ParseConfig parses the string s and extracts the cos config. The two supported configuration formats are cos://host/bucketname/prefix and cos:host/bucketname/prefix. The host can also be a valid obs region
func (*Config) ApplyEnvironment ¶ added in v1.2.0
type TxCos ¶
func (*TxCos) Connections ¶ added in v1.2.0
func (*TxCos) HasAtomicReplace ¶ added in v1.2.0
func (*TxCos) IsAccessDenied ¶
IsAccessDenied returns true if the error is caused by Access Denied.
func (*TxCos) IsNotExist ¶
Click to show internal directories.
Click to hide internal directories.