config

package
v0.0.0-...-c705df5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFlags

func ParseFlags() (string, error)

ParseFlags will create and parse the CLI flags and return the path to be used elsewhere

func ValidateConfigPath

func ValidateConfigPath(path string) error

ValidateConfigPath just makes sure, that the path provided is a file, that can be read

Types

type Config

type Config struct {
	UpdateInterval int `yaml:"update_interval"`
	Anilist        struct {
		Username string `yaml:"username"`
	} `yaml:"Anilist"`
	MyAnimeList struct {
		CsrfToken string `yaml:"csrf_token"`
		Cookies   struct {
			MALSESSIONID  string `yaml:"MALSESSIONID"`
			MALHLOGSESSID string `yaml:"MALHLOGSESSID"`
		} `yaml:"cookies"`
	} `yaml:"MyAnimeList"`
}

func NewConfig

func NewConfig(configPath string) (*Config, error)

NewConfig returns a new decoded Config struct

Jump to

Keyboard shortcuts

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