Documentation ¶
Overview ¶
Package config defines the configuration settings shared by the subcommands of the ffs command-line tool.
Index ¶
- func ExpandString(s *string)
- func OpenStore(_ context.Context, addr string) (blob.CAS, error)
- func ParseKey(s string) (string, error)
- func PrintableKey(key string) interface{}
- func RootKey(s string) string
- func RootKeys(args []string) ([]string, error)
- func ToJSON(msg interface{}) string
- func WithStore(ctx context.Context, addr string, f func(blob.CAS) error) error
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandString ¶
func ExpandString(s *string)
ExpandString calls os.ExpandEnv to expand environment variables in *s. The value of *s is replaced.
func OpenStore ¶
OpenStore connects to the store service at addr. The caller is responsible for closing the store when it is no longer needed.
func ParseKey ¶
ParseKey parses the string encoding of a key. By default, s must be hex encoded. If s begins with "@", it is taken literally. If s begins with "+" it is taken as base64.
func PrintableKey ¶
func PrintableKey(key string) interface{}
PrintableKey converts key into a value that will marshal into JSON as a sensible human-readable string.
Types ¶
type Settings ¶
type Settings struct { // Context value governing the execution of the tool. Context context.Context `json:"-" yaml:"-"` // The default address for the blob store service (required). StoreAddress string `json:"storeAddress" yaml:"store-address"` }
Settings represents the stored configuration settings for the ffs tool.
func Load ¶
Load reads and parses the contents of a config file from path. If the specified path does not exist, an empty config is returned without error.