MCPcopy
hub / github.com/rclone/rclone / Policy

Interface Policy

backend/union/policy/policy.go:18–36  ·  view source on GitHub ↗

Policy is the interface of a set of defined behavior choosing the upstream Fs to operate on

Source from the content-addressed store, hash-verified

16// Policy is the interface of a set of defined behavior choosing
17// the upstream Fs to operate on
18type Policy interface {
19 // Action category policy, governing the modification of files and directories
20 Action(ctx context.Context, upstreams []*upstream.Fs, path string) ([]*upstream.Fs, error)
21
22 // Create category policy, governing the creation of files and directories
23 Create(ctx context.Context, upstreams []*upstream.Fs, path string) ([]*upstream.Fs, error)
24
25 // Search category policy, governing the access to files and directories
26 Search(ctx context.Context, upstreams []*upstream.Fs, path string) (*upstream.Fs, error)
27
28 // ActionEntries is ACTION category policy but receiving a set of candidate entries
29 ActionEntries(entries ...upstream.Entry) ([]upstream.Entry, error)
30
31 // CreateEntries is CREATE category policy but receiving a set of candidate entries
32 CreateEntries(entries ...upstream.Entry) ([]upstream.Entry, error)
33
34 // SearchEntries is SEARCH category policy but receiving a set of candidate entries
35 SearchEntries(entries ...upstream.Entry) (upstream.Entry, error)
36}
37
38func registerPolicy(name string, p Policy) {
39 policies[strings.ToLower(name)] = p

Callers 34

actionMethod · 0.65
ActionMethod · 0.65
ActionMethod · 0.65
ActionMethod · 0.65
ActionMethod · 0.65
ActionMethod · 0.65
ActionMethod · 0.65
makeBucketMethod · 0.65
UpdateMethod · 0.65
MoveMethod · 0.65
createMethod · 0.65
CreateMethod · 0.65

Implementers 8

EpRandbackend/union/policy/eprand.go
EpLusbackend/union/policy/eplus.go
EpLfsbackend/union/policy/eplfs.go
EpFFbackend/union/policy/epff.go
Newestbackend/union/policy/newest.go
EpMfsbackend/union/policy/epmfs.go
EpLnobackend/union/policy/eplno.go
Randbackend/union/policy/rand.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…