File: service_config.go

package info (click to toggle)
golang-github-nicholas-fedor-shoutrrr 0.8.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,332 kB
  • sloc: sh: 61; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package types

import "net/url"

// Enummer contains fields that have associated EnumFormatter instances.
type Enummer interface {
	Enums() map[string]EnumFormatter
}

// ServiceConfig is the common interface for all types of service configurations.
type ServiceConfig interface {
	Enummer
	GetURL() *url.URL
	SetURL(url *url.URL) error
}

// ConfigQueryResolver is the interface used to get/set and list service config query fields.
type ConfigQueryResolver interface {
	Get(key string) (value string, err error)
	Set(key string, value string) error
	QueryFields() []string
}