config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "v1.1.0"
)

Variables

This section is empty.

Functions

func Usage

func Usage()

Types

type Config

type Config struct {
	SeaOrigin         string     `split_words:"true" default:"https://c.linkage.community"`
	ClientID          string     `split_words:"true" required:"true"`
	ClientSecret      string     `split_words:"true" required:"true"`
	CredentialFile    string     `split_words:"true" default:"credential.json"`
	CurrentCredential Credential `ignored:"true"`
}

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) LoadCurrentCredential

func (c *Config) LoadCurrentCredential() error

func (*Config) SaveCredential

func (c *Config) SaveCredential(crd *Credential) error

type Credential

type Credential struct {
	AccessToken string `json:"access_token"`
}

Jump to

Keyboard shortcuts

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