github

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccount

func GetAccount(accessToken string) (types.Account, error)

Types

type Account

type Account struct {
	// Name is the user-defined label for this github account
	Name string `json:"name" yaml:"name"`
	// Description is a user-defined description of what this account is for
	Description string `json:"description" yaml:"description"`
	// AccessToken is the token that can be generated for use as a Personal Access Token,
	// this can be created at https://github.com/settings/tokens
	//
	// You'll need the following list of permissions when generating this:
	// - repo:status
	// - repo_deployment
	// - public_repo
	// - repo:invite
	// - read:packages
	// - read:org
	// - read:public_key
	// - read:repo_hook
	// - notifications
	// - read:user
	// - read:discussion
	// - read:enterprise
	// - read:gpg_key
	AccessToken string `json:"accessToken" yaml:"accessToken"`
	// Public indicates whether this account should be public, if so, the /platforms
	// endpoint on the dev server will expose this account; this is done to accomodate
	// using both personal and work accounts
	Public bool `json:"public" yaml:"public"`
}

Account defines the structure of the configuration for a single logical Github account in the configuration

func (Account) GetSanitized

func (a Account) GetSanitized() Account

GetSanitized returns a copy of the current Account instance with sensitive credentials removed

type AccountSerializer

type AccountSerializer struct {
	// contains filtered or unexported fields
}

func (AccountSerializer) GetCreatedAt

func (as AccountSerializer) GetCreatedAt() *string

func (AccountSerializer) GetEmail

func (as AccountSerializer) GetEmail() *string

func (AccountSerializer) GetFollowerCount

func (as AccountSerializer) GetFollowerCount() *int

func (AccountSerializer) GetIsAdmin

func (as AccountSerializer) GetIsAdmin() *bool

func (AccountSerializer) GetLastSeen

func (as AccountSerializer) GetLastSeen() *string
func (as AccountSerializer) GetLink() *string

func (AccountSerializer) GetName

func (as AccountSerializer) GetName() *string

func (AccountSerializer) GetProjectCount

func (as AccountSerializer) GetProjectCount() *int

func (AccountSerializer) GetUsername

func (as AccountSerializer) GetUsername() *string

type Accounts

type Accounts []Account

Accounts defines a list of accounts that can be operated on

func (Accounts) GetSanitized

func (a Accounts) GetSanitized() Accounts

GetSanitized returns a clone of the current Accounts instance without sensitive credentials

type Config

type Config struct {
	Accounts Accounts `json:"accounts" yaml:"accounts"`
}

Config defines the structure of the configuration for the github platform

func (Config) GetSanitized

func (c Config) GetSanitized() Config

GetSanitized returns a clone of the current Config instance without sensitive credentials

Jump to

Keyboard shortcuts

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