config

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GitHubOAuthClientID    = "dfa945a930f44d9be359"
	GitHubOAuthCLIToAPIURL = "http://127.0.0.1:8080/github/oauth/callback"

	GitHubOAuthAPIToCLIURLPath = "/github/oauth/callback"

	GitHubOAuthScopes = []string{
		"read:user",
		"user:email",
		"repo",
		"admin:public_key",
		"admin:gpg_key",
	}
)

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