settings

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAuthToken

func LoadAuthToken(address string) (string, error)

func ProjectSettingsDir

func ProjectSettingsDir(projectRoot string) string

func SaveAuthToken

func SaveAuthToken(address string, username string, token string) error

Types

type AuthInfo

type AuthInfo struct {
	Token    string `json:"token"`
	Username string `json:"username"`
}

type ProjectSettings

type ProjectSettings struct {
	Model *model.Model `json:"model"`
	// contains filtered or unexported fields
}

func LoadProjectSettings

func LoadProjectSettings(projectRoot string) (*ProjectSettings, error)

func (*ProjectSettings) Save

func (s *ProjectSettings) Save() error

type UserSettings

type UserSettings struct {
	Auth map[string]AuthInfo `json:"auth"`
}

func LoadUserSettings

func LoadUserSettings() (*UserSettings, error)

func (*UserSettings) Token

func (s *UserSettings) Token(address string) string

func (*UserSettings) Username

func (s *UserSettings) Username(address string) (token string, err error)

Jump to

Keyboard shortcuts

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