Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UsageExample ¶
func UsageExample() error
Types ¶
type SomeConfigurableStruct ¶
type SomeConfigurableStruct struct {
// contains filtered or unexported fields
}
Define your struct using the Value types from gconfig, choosing the appropriate type for the data sensitivity. passwords, access tokens, credentials ect should always use SecretStringValue
non sensitive values like IDs etc may use StringValue or OptionalStringValue, though there is little harm in using SecretStringValue for these too if you think it suits the use case better
StringValue SecretStringValue OptionalStringValue
func (*SomeConfigurableStruct) Config ¶
func (s *SomeConfigurableStruct) Config() gconfig.Config
Implement the Configer Interface for your struct. This returns a Config which defines the field types and enables loading and usage of the values
Click to show internal directories.
Click to hide internal directories.