github

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName          = "github"
	ProviderDisplayName   = "Github"
	ProviderConnectorType = "github"
	OrganizationKey       = "organization"
	TeamKey               = "team"
	AppIDKey              = "app-id"
	PrivateKeyKey         = "private-key"
	ClientIDKey           = "client-id"
	ClientSecretKey       = "client-secret"
	DefaultHost           = "github.com"
	TeamNameFieldSlug     = "slug"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidcConfig asserts invalidConfigError.

func IsMissingCallbackURI

func IsMissingCallbackURI(err error) bool

IsMissingCallbackURI asserts missingCallbackURIError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsRequestFailed

func IsRequestFailed(err error) bool

IsRequestFailed asserts requestFailedError.

Types

type Config

type Config struct {
	Organization string
	Team         string
	AppID        int64
	PrivateKey   []byte
	ClientID     string
	ClientSecret string
}

type Github

type Github struct {
	Client       *githubclient.Client
	Log          *logr.Logger
	Name         string
	Description  string
	Type         string
	Owner        string
	Organization string
	Team         string
	// contains filtered or unexported fields
}

func New

func (*Github) CleanCredentialsForAuthenticatedApp

func (g *Github) CleanCredentialsForAuthenticatedApp(config provider.AppConfig) error

func (*Github) CreateApp

func (g *Github) CreateApp(config provider.AppConfig) (*githubclient.AppConfig, error)

func (*Github) CreateOrUpdateApp

func (g *Github) CreateOrUpdateApp(config provider.AppConfig, ctx context.Context, oldConnector dex.Connector) (provider.ProviderApp, error)

func (*Github) DeleteApp

func (g *Github) DeleteApp(name string, ctx context.Context) error

func (*Github) DeleteAuthenticatedApp added in v0.5.0

func (g *Github) DeleteAuthenticatedApp(config provider.AppConfig) error

func (*Github) GetAppData

func (g *Github) GetAppData(app *githubclient.AppConfig) Config

func (*Github) GetCredentialsForAuthenticatedApp

func (g *Github) GetCredentialsForAuthenticatedApp(config provider.AppConfig) (map[string]string, error)

func (*Github) GetName

func (g *Github) GetName() string

func (*Github) GetOwner

func (g *Github) GetOwner() string

func (*Github) GetProviderName

func (g *Github) GetProviderName() string

func (*Github) GetType

func (g *Github) GetType() string

func (*Github) UpdateNeeded

func (g *Github) UpdateNeeded(app *githubclient.App, config provider.AppConfig) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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