MCPcopy
hub / github.com/cloudreve/cloudreve / SettingStoreAdapter

Interface SettingStoreAdapter

pkg/setting/adapters.go:22–26  ·  view source on GitHub ↗

SettingStoreAdapter chains a setting get operation, if current adapter cannot locate setting value, it will invoke next adapter until last one.

Source from the content-addressed store, hash-verified

20// SettingStoreAdapter chains a setting get operation, if current adapter cannot locate setting value,
21// it will invoke next adapter until last one.
22type SettingStoreAdapter interface {
23 // Get a string setting from underlying store, if setting not found, default
24 // value will be used.
25 Get(ctx context.Context, name string, defaultVal any) any
26}
27
28// NewDbSettingStore creates an adapter using DB setting store. Only string type value is supported.
29func NewDbSettingStore(c inventory.SettingClient, next SettingStoreAdapter) SettingStoreAdapter {

Callers 8

GetMethod · 0.65
NewMethod · 0.65
getIntMethod · 0.65
getInt64Method · 0.65
getFloat64Method · 0.65
getBooleanMethod · 0.65
getStringMethod · 0.65
GetMethod · 0.65

Implementers 15

DavAccountClientent/client.go
DirectLinkClientent/client.go
EntityClientent/client.go
FileClientent/client.go
FsEventClientent/client.go
GroupClientent/client.go
MetadataClientent/client.go
NodeClientent/client.go
OAuthClientClientent/client.go
OAuthGrantClientent/client.go
PasskeyClientent/client.go
SettingClientent/client.go

Calls

no outgoing calls

Tested by

no test coverage detected