config

package
v0.0.0-...-c9fddc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigExt = ".json"
	DefaultConfig    = "config" + DefaultConfigExt
)

Variables

This section is empty.

Functions

func WriteConfig

func WriteConfig(path string, conf *Config) error

WriteConfig writes a CAS config file to a given path. It will add an name of default config if the specified path ends with a separator. It will also guess a file extension if it was not specified.

Types

type Config

type Config struct {
	// Storage is a config for a primary storage used in this CAS.
	Storage storage.Config
}

Config stores all configuration of a CAS.

func ReadConfig

func ReadConfig(path string) (*Config, error)

ReadConfig reads a CAS config file from a given path. It will add an name of default config if the specified path ends with a separator. It will also guess a file extension if it was not specified.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL