hooks

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubCommit

type GithubCommit struct {
	Author struct {
		Name     string `json:"name,omitempty"`
		Email    string `json:"email,omitempty"`
		Username string `json:"username,omitempty"`
	} `json:"author,omitempty"`
	Committer struct {
		Name  string `json:"name,omitempty"`
		Email string `json:"email,omitempty"`
	} `json:"committer,omitempty"`
	Message string `json:"message,omitempty"`
	ID      string `json:"id,omitempty"`
	URL     string `json:"url,omitempty"`
}

type GithubEvent

type GithubEvent struct {
	GithubOrganization `json:"organization,omitempty"`
	GithubSender       `json:"sender,omitempty"`
	GithubRelease      `json:"release,omitempty"`
	GithubCommits      []GithubCommit `json:"commits,omitempty"`
	Action             string         `json:"action,omitempty"`
}

type GithubOrganization

type GithubOrganization struct {
	IssuesURL string `json:"issues_url"`
	ReposURL  string `json:"repos_url"`
}

type GithubRelease

type GithubRelease struct {
	AssetsURL string `json:"assets_url"`
	HTMLURL   string `json:"html_url"`
	ID        int    `json:"id"`
}

type GithubSender

type GithubSender struct {
	ID    int    `json:"id"`
	Login string `json:"login"`
}

type HookEvent

type HookEvent struct {
	GithubEvent GithubEvent `json:"fullPayload"`
	K8sDeployEvent
}

type Hooks

type Hooks struct {
	Config *config.Config
}

func NewHooks

func NewHooks(cfg *config.Config) *Hooks

func (*Hooks) HandleHook

func (h *Hooks) HandleHook(w http.ResponseWriter, r *http.Request)

func (*Hooks) InformOrchestrator

func (h *Hooks) InformOrchestrator(i HookEvent, companyID, key, secret string) error

func (*Hooks) ValidateKey

func (h *Hooks) ValidateKey(companyID, key, secret string) (bool, error)

type K8sDeployEvent

type K8sDeployEvent struct {
	ImageHash        string `json:"imageHash"`
	ImageTag         string `json:"imageTag"`
	ServiceName      string `json:"serviceName"`
	ServiceNamespace string `json:"serviceNamespace"`
}

Jump to

Keyboard shortcuts

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