Documentation
¶
Overview ¶
Package github provides both a server and a client that can be used to interact with the GitHub API
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
}
Client holds logic to create a new GitHub client
func NewClient ¶
func NewClient(options ...ClientOption) *Client
NewClient creates a new instance of Client, taking in Client options and creating a GitHub client
type ClientOption ¶
type ClientOption func(*Client)
ClientOption an option function to customize Client
func WithPrivateKeyPath ¶
func WithPrivateKeyPath(privateKeyPath string) ClientOption
WithPrivateKeyPath sets client's privateKeyPath
type EventHandler ¶
type EventHandler interface {
HandleEvent(event interface{})
}
EventHandler interface to allow hooking into GitHub events
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server used to listen for and pass off GitHub events
func NewServer ¶
func NewServer(options ...ServerOption) *Server
NewServer creates a new instance of Server, taking in ServerOptions
type ServerOption ¶
type ServerOption func(*Server)
ServerOption an option function to customize Server
func WithEventHandler ¶
func WithEventHandler(eventHandler EventHandler) ServerOption
WithEventHandler sets Server's eventHandler
func WithWebhookSecretKey ¶
func WithWebhookSecretKey(webhookSecretKey string) ServerOption
WithWebhookSecretKey sets Server's webhookSecretKey