Documentation
¶
Overview ¶
Package location implements parsing the restic repository location from a string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoPassword ¶
NoPassword returns the repository location unchanged (there's no sensitive information there)
func StripPassword ¶
StripPassword returns a displayable version of a repository location (with any sensitive information removed)
Types ¶
type Factory ¶
type Factory interface { Scheme() string ParseConfig(s string) (interface{}, error) StripPassword(s string) string Create(ctx context.Context, cfg interface{}, rt http.RoundTripper, lim limiter.Limiter) (backend.Backend, error) Open(ctx context.Context, cfg interface{}, rt http.RoundTripper, lim limiter.Limiter) (backend.Backend, error) }
func NewHTTPBackendFactory ¶
func NewHTTPBackendFactory[C any, T backend.Backend]( scheme string, parseConfigFn func(s string) (*C, error), stripPasswordFn func(s string) string, createFn func(ctx context.Context, cfg C, rt http.RoundTripper) (T, error), openFn func(ctx context.Context, cfg C, rt http.RoundTripper) (T, error)) Factory
func NewLimitedBackendFactory ¶
func NewLimitedBackendFactory[C any, T backend.Backend]( scheme string, parseConfigFn func(s string) (*C, error), stripPasswordFn func(s string) string, createFn func(ctx context.Context, cfg C, lim limiter.Limiter) (T, error), openFn func(ctx context.Context, cfg C, lim limiter.Limiter) (T, error)) Factory
type Location ¶
type Location struct { Scheme string Config interface{} }
Location specifies the location of a repository, including the method of access and (possibly) credentials needed for access.
Click to show internal directories.
Click to hide internal directories.