github

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New() *Client

func (*Client) Authenticate

func (x *Client) Authenticate(ctx *model.Context, clientID, clientSecret, code string) (*model.GitHubToken, error)

func (*Client) GetUser

func (x *Client) GetUser(ctx *model.Context, token *model.GitHubToken) (*github.User, error)

type Interface

type Interface interface {
	Authenticate(ctx *model.Context, clientID, clientSecret, code string) (*model.GitHubToken, error)
	GetUser(ctx *model.Context, token *model.GitHubToken) (*github.User, error)
}

This package is used to download trivy database, not used by GitHub App.

type Mock

type Mock struct {
	AuthenticateMock func(ctx *model.Context, clientID string, clientSecret string, code string) (*model.GitHubToken, error)
	GetUserMock      func(ctx *model.Context, token *model.GitHubToken) (*github.User, error)
}

func NewMock

func NewMock() *Mock

func (*Mock) Authenticate

func (x *Mock) Authenticate(ctx *model.Context, clientID string, clientSecret string, code string) (*model.GitHubToken, error)

func (*Mock) GetUser

func (x *Mock) GetUser(ctx *model.Context, token *model.GitHubToken) (*github.User, error)

Jump to

Keyboard shortcuts

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