config

package
v1.0.63 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthTokenData = make(chan CombinedTokenStructure)

Functions

func LoadConfiguration

func LoadConfiguration()

func VerifyConfigExists

func VerifyConfigExists() bool

func WriteSecretsToHomeDirectory

func WriteSecretsToHomeDirectory(clientSecret string, clientId string)

func WriteTokenToHomeDirectory

func WriteTokenToHomeDirectory(configData *CombinedTokenStructure, initiateChannel bool)

Types

type CombinedTokenStructure added in v1.0.61

type CombinedTokenStructure struct {
	ModifyToken      UserModifyTokenStructure      `yaml:"ModifyToken"`
	ReadToken        UserReadTokenStructure        `yaml:"ReadToken"`
	LibraryReadToken UserLibraryReadTokenStructure `yaml:"LibraryReadToken"`
}

func ReadTokenFromHome

func ReadTokenFromHome(tokenType constants.TokenType) *CombinedTokenStructure

type Config added in v1.0.61

type Config struct {
	ClientId        string
	ClientSecret    string
	RequestedScopes string
}
var GlobalConfig Config

type EnvVarConfig added in v1.0.61

type EnvVarConfig struct {
	ClientId     string `yaml:"ClientId"`
	ClientSecret string `yaml:"ClientSecret"`
}

type UserLibraryReadTokenStructure added in v1.0.61

type UserLibraryReadTokenStructure struct {
	UserLibraryReadToken          string `yaml:"UserLibraryReadToken"`
	UserLibraryReadRefreshToken   string `yaml:"UserLibraryReadRefreshToken"`
	UserLibraryReadTokenExpiresIn int64  `yaml:"UserLibraryReadTokenExpiresIn"`
}

type UserModifyTokenStructure added in v1.0.61

type UserModifyTokenStructure struct {
	UserModifyToken          string `yaml:"UserModifyToken"`
	UserModifyRefreshToken   string `yaml:"UserModifyRefreshToken"`
	UserModifyTokenExpiresIn int64  `yaml:"UserModifyTokenExpiresIn"`
}

type UserReadTokenStructure added in v1.0.61

type UserReadTokenStructure struct {
	UserReadToken          string `yaml:"UserReadToken"`
	UserReadRefreshToken   string `yaml:"UserReadRefreshToken"`
	UserReadTokenExpiresIn int64  `yaml:"UserReadTokenExpiresIn"`
}

Jump to

Keyboard shortcuts

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