github

package
v2.0.0-alpha16+incompa... Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Github = "github"
)

Constants for github

Variables

This section is empty.

Functions

func ConfigFormatter

func ConfigFormatter(apiContext *types.APIContext, resource *types.RawResource)

func FormGithubRedirectURL

func FormGithubRedirectURL(githubConfig *v3.GithubConfig) string

func URLEncoded

func URLEncoded(str string) string

URLEncoded encodes the string

Types

type Account

type Account struct {
	ID        int    `json:"id,omitempty"`
	Login     string `json:"login,omitempty"`
	Name      string `json:"name,omitempty"`
	AvatarURL string `json:"avatar_url,omitempty"`
	HTMLURL   string `json:"html_url,omitempty"`
}

Account defines properties an account on github has

type GClient

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

GClient implements a httpclient for github

type GProvider

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

GProvider implements an PrincipalProvider for github

func Configure

func Configure(ctx context.Context, mgmtCtx *config.ManagementContext, userMGR common.UserManager) *GProvider

func (*GProvider) AuthenticateUser

func (g *GProvider) AuthenticateUser(input interface{}) (v3.Principal, []v3.Principal, map[string]string, int, error)

func (*GProvider) ConfigActionHandler

func (g *GProvider) ConfigActionHandler(actionName string, action *types.Action, request *types.APIContext) error

func (*GProvider) GetName

func (g *GProvider) GetName() string

GetName returns the name of the provider

func (*GProvider) LoginUser

func (g *GProvider) LoginUser(githubCredential *v3public.GithubLogin, config *v3.GithubConfig) (v3.Principal, []v3.Principal, map[string]string, int, error)

func (*GProvider) SaveGithubConfig

func (g *GProvider) SaveGithubConfig(config *v3.GithubConfig) error

func (*GProvider) SearchPrincipals

func (g *GProvider) SearchPrincipals(searchKey string, myToken v3.Token) ([]v3.Principal, int, error)

type Team

type Team struct {
	ID           int                    `json:"id,omitempty"`
	Organization map[string]interface{} `json:"organization,omitempty"`
	Name         string                 `json:"name,omitempty"`
	Slug         string                 `json:"slug,omitempty"`
}

Team defines properties a team on github has

Jump to

Keyboard shortcuts

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