Debian Codegraph @

pkg/types/service_config.go

raw
1 package types
2
3 import "net/url"
4
5 // Enummer contains fields that have associated EnumFormatter instances.
6 type Enummer interface {
7 Enums() map[string]EnumFormatter
8 }
9
10 // ServiceConfig is the common interface for all types of service configurations.
11 type ServiceConfig interface {
12 Enummer
13 GetURL() *url.URL
14 SetURL(serviceURL *url.URL) error
15 }
16
17 // ConfigQueryResolver is the interface used to get/set and list service config query fields.
18 type ConfigQueryResolver interface {
19 Get(key string) (value string, err error)
20 Set(key, value string) error
21 QueryFields() []string
22 }