github

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: MIT Imports: 6 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)

func GetNotifications added in v0.0.6

func GetNotifications(accessToken string, since ...time.Time) (types.Notifications, error)

GetNotifications returns the serialized version of the Github notifications

Types

type Account

type Account pkg.APIv3UserResponse

Account implements types.Account

func (Account) GetCreatedAt added in v0.0.6

func (a Account) GetCreatedAt() *string

func (Account) GetEmail added in v0.0.6

func (a Account) GetEmail() *string

func (Account) GetFollowerCount added in v0.0.6

func (a Account) GetFollowerCount() *int

func (Account) GetIsAdmin added in v0.0.6

func (a Account) GetIsAdmin() *bool

func (Account) GetLastSeen added in v0.0.6

func (a Account) GetLastSeen() *string
func (a Account) GetLink() *string

func (Account) GetName added in v0.0.6

func (a Account) GetName() *string

func (Account) GetProjectCount added in v0.0.6

func (a Account) GetProjectCount() *int

func (Account) GetUsername added in v0.0.6

func (a Account) GetUsername() *string

type AccountConfig added in v0.0.6

type AccountConfig 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"`
}

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

func (AccountConfig) GetSanitized added in v0.0.6

func (a AccountConfig) GetSanitized() AccountConfig

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

type AccountConfigs added in v0.0.6

type AccountConfigs []AccountConfig

AccountConfigs defines a list of accounts that can be operated on

func (AccountConfigs) GetSanitized added in v0.0.6

func (a AccountConfigs) GetSanitized() AccountConfigs

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

type Config

type Config struct {
	Accounts AccountConfigs `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

func (*Config) MergeWith added in v0.0.7

func (c *Config) MergeWith(o Config)

MergeWith merges the current Config instance with a provided Config instance. The merge strategy is add-only

type Notification added in v0.0.6

type Notification pkg.APIv3Notification

func (Notification) GetMessage added in v0.0.6

func (n Notification) GetMessage() string

func (Notification) GetTitle added in v0.0.6

func (n Notification) GetTitle() string

Jump to

Keyboard shortcuts

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