hoardix

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New() *App

func (*App) BaseURL

func (a *App) BaseURL() *url.URL

func (*App) Logger

func (a *App) Logger() zerolog.Logger

func (*App) NarinfoCache

func (a *App) NarinfoCache() cache.NarinfoCache

func (*App) Run

func (a *App) Run(args []string) error

func (*App) Storage

func (a *App) Storage() storage.Storage

type Config

type Config struct {
	BaseURL           URL                     `yaml:"base_url,omitempty"`
	ListenPort        *int                    `yaml:"listen_port,omitempty"`
	MetricsListenPort *int                    `yaml:"metrics_listen_port,omitempty"`
	Tokens            []token.Config          `yaml:"tokens,omitempty"`
	Storage           storage.Config          `yaml:"storage,omitempty"`
	Caches            map[string]cache.Config `yaml:"caches,omitempty"`
}

func (*Config) String

func (c *Config) String() string

type URL

type URL struct {
	*url.URL
}

func (URL) MarshalYAML

func (u URL) MarshalYAML() (interface{}, error)

func (*URL) UnmarshalYAML

func (u *URL) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

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