githubeventsrcsvc

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

This should probably be split into multiple parts: event source and general integration as it does several stuff.

Index

Constants

This section is empty.

Variables

View Source
var EventTypes = []string{
	"check_run",
	"check_suite",
	"commit_comment",
	"create",
	"delete",
	"deployment",
	"deployment_review",
	"deployment_status",
	"discussion",
	"discussion_comment",
	"fork",
	"gollum",
	"issues",
	"issue_comment",
	"label",
	"member",
	"membership",
	"merge_queue_entry",
	"meta",
	"milestone",
	"organization",
	"org_block",
	"project",
	"project_card",
	"project_column",
	"public",
	"pull_request",
	"pull_request_review",
	"pull_request_review_comment",
	"pull_request_review_thread",
	"push",
	"release",
	"repository",
	"repository_dispatch",
	"star",
	"status",
	"team",
	"team_add",
	"watch",
	"workflow_dispatch",
	"workflow_job",
	"workflow_run",
}

TODO: filter.

Functions

This section is empty.

Types

type Config

type Config struct {
	EventSourceID apieventsrc.EventSourceID `envconfig:"EVENT_SOURCE_ID" json:"event_source_id"`
	WebhookSecret string                    `envconfig:"WEBHOOK_SECRET" json:"webhook_secret"`
	AppID         int64                     `envconfig:"APP_ID" json:"app_id"`
	AppPrivateKey string                    `envconfig:"APP_PRIVATE_KEY" json:"app_private_key"`
}

type Svc

type Svc struct {
	pb.UnimplementedGithubEventSourceServer

	Config       Config
	Events       *events.Events
	EventSources eventsrcsstore.Store
	Installs     *githubinstalls.Installs
	L            L.Nullable
}

func (*Svc) Add

func (s *Svc) Add(ctx context.Context, pid apiproject.ProjectID, name, org, repo string) error

func (*Svc) Bind

func (s *Svc) Bind(ctx context.Context, req *pb.BindRequest) (*pb.BindResponse, error)

func (*Svc) Register

func (s *Svc) Register(ctx context.Context, srv *grpc.Server, gw *runtime.ServeMux, r *mux.Router)

func (*Svc) Unbind

func (s *Svc) Unbind(ctx context.Context, req *pb.UnbindRequest) (*pb.UnbindResponse, error)

Jump to

Keyboard shortcuts

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