Documentation ¶
Index ¶
Constants ¶
View Source
const ExtensionRegex = `gz|xz|zstd`
Variables ¶
View Source
var SampleConfig string
Functions ¶
This section is empty.
Types ¶
type Compression ¶
type Compression struct { Format CompressionFormat Level *int `yaml:",omitempty"` }
Compression is an immutable type that specifies a compression format and level.
func NewSpecWithLevel ¶
func NewSpecWithLevel(format CompressionFormat, level int) Compression
func (Compression) Equal ¶
func (spec Compression) Equal(other Compression) bool
func (Compression) Equals ¶
func (spec Compression) Equals(other Compression) bool
func (Compression) LevelActual ¶
func (spec Compression) LevelActual() int
func (Compression) NewReader ¶
func (spec Compression) NewReader(r io.Reader) (io.ReadCloser, error)
func (Compression) NewWriter ¶
func (spec Compression) NewWriter(w io.Writer) io.WriteCloser
type CompressionFormat ¶
type CompressionFormat int
const ( Gzip CompressionFormat = 0 Xz CompressionFormat = 1 Zstd CompressionFormat = 2 )
func AllCompressionFormats ¶ added in v0.1.2
func AllCompressionFormats() []CompressionFormat
func NewFormatFromExtension ¶
func NewFormatFromExtension(extension string) (CompressionFormat, bool)
func NewFormatFromId ¶
func NewFormatFromId(id string) (CompressionFormat, bool)
func (*CompressionFormat) Extension ¶
func (format *CompressionFormat) Extension() string
func (CompressionFormat) MarshalYAML ¶
func (format CompressionFormat) MarshalYAML() (interface{}, error)
func (*CompressionFormat) String ¶
func (format *CompressionFormat) String() string
func (*CompressionFormat) UnmarshalYAML ¶
func (format *CompressionFormat) UnmarshalYAML(unmarshal func(interface{}) error) error
type Config ¶
type Config struct { Port int WorkspacePath string `yaml:"workspacePath"` Feeds []Feed ObjectStorage []ObjectStorage `yaml:"objectStorage"` Secrets []string DisableMerging bool `yaml:"disableMerging"` PacksPerHour int `yaml:"packsPerHour"` UploadsPerHour int `yaml:"uploadsPerHour"` Sync bool LogLevel string `yaml:"logLevel"` }
func NewConfigWithDefaults ¶
func NewConfigWithDefaults() *Config
func (*Config) LogLevelParsed ¶
Click to show internal directories.
Click to hide internal directories.