config

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package config provides the configuration for Admin server.

Index

Constants

This section is empty.

Variables

View Source
var AdminAddr string

AdminAddr is the address of the admin server.

Functions

func LoadToken added in v0.2.14

func LoadToken(addr string) (string, error)

LoadToken loads the token from the given address.

func Save added in v0.2.14

func Save(config *Config) error

Save saves the configuration to the given path.

Types

type Config added in v0.2.14

type Config struct {
	// Auths is the map of the address and the token.
	Auths map[string]string `json:"auths"`
}

Config is the configuration of CLI.

func Load added in v0.2.14

func Load() (*Config, error)

Load loads the configuration from the given path.

func New added in v0.2.14

func New() *Config

New creates a new configuration.

Jump to

Keyboard shortcuts

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