config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorsUnderline = gchalk.Underline
	ColorsBold      = gchalk.Bold
	ColorsGreen     = gchalk.Green
	ColorsBlue      = gchalk.Cyan
	ColorsCyan      = gchalk.Cyan
	ColorsRed       = gchalk.Red
	ColorsYellow    = gchalk.Yellow
	ColorsWhite     = gchalk.BrightWhite
)
View Source
var (
	GitHubOAuthClientID = "523ada8718f092d34c40"

	GitHubOAuthCLIToAPIURLPath = "/github/oauth/callback"
	GitHubOAuthCLIToAPIURL     = "http://127.0.0.1:8080" + GitHubOAuthCLIToAPIURLPath

	GitHubOAuthAPIToCLIURLPath = "/github/oauth/callback"

	GitHubOAuthScopes = []string{
		"read:user",
		"user:email",
		"repo",
		"admin:public_key",
	}
)
View Source
var (
	ColorsBGBlue = gchalk.BgCyan
)

Functions

This section is empty.

Types

type UserConfig

type UserConfig struct{}

func NewUserConfig

func NewUserConfig() UserConfig

func (UserConfig) GetBool

func (UserConfig) GetBool(key UserConfigKey) bool

func (UserConfig) GetString

func (UserConfig) GetString(key UserConfigKey) string

func (UserConfig) PopulateFromGitHubUser

func (u UserConfig) PopulateFromGitHubUser(githubUser *github.AuthenticatedUser)

func (UserConfig) Set

func (UserConfig) Set(key UserConfigKey, value interface{})

func (UserConfig) WriteConfig

func (UserConfig) WriteConfig() error

type UserConfigKey

type UserConfigKey string
const (
	UserConfigKeyUserIsLoggedIn    UserConfigKey = "user_is_logged_in"
	UserConfigKeyGitHubAccessToken UserConfigKey = "github_access_token"
	UserConfigKeyGitHubUsername    UserConfigKey = "github_username"
	UserConfigKeyGitHubEmail       UserConfigKey = "github_email"
	UserConfigKeyGitHubFullName    UserConfigKey = "github_full_name"
)

Jump to

Keyboard shortcuts

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