github_webhook_action

package module
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 13 Imported by: 0

README

github_webhook_action

github webhook 을 받아 필요한 액션(api 호출)을 수행하는 라이브러리입니다.

  • 참고로 이미 있는 version(tag)을 삭제 후 새로 만들어도 mod package 에서는 최초 태그만 인식한다. 그러니 version 을 올리자.

  • 사용방법

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Zerologger zerolog.Logger

Functions

func CreateLogger

func CreateLogger(logFile, logLevelString string, isJson bool)

func LoadConfig

func LoadConfig()

func TailLog added in v0.1.8

func TailLog() string

Types

type ConfigTOML

type ConfigTOML struct {
	Name      string `toml:"Name"`
	BuildTime string `toml:"BuildTime"`
	Server    struct {
		Port             int    `toml:"Port"`
		LogFile          string `toml:"LogFile"`
		LogLevel         string `toml:"LogLevel"`
		LogIsJSONFormat  bool   `toml:"LogIsJsonFormat"`
		WebhookSecretKey string `toml:"WebhookSecretKey"`
	} `toml:"server"`
	Hook []struct {
		RepoName string `toml:"RepoName"`
	} `toml:"hook"`
	Action struct {
		Enable bool   `toml:"Enable"`
		Method string `toml:"Method"`
		Auth   string `toml:"Auth"`
		URL    string `toml:"URL"`
	} `toml:"action"`
}
var Conf ConfigTOML

type GAERouter

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

func NewGAERouter

func NewGAERouter(gwh *GithubWebhook, allowCORS bool) *GAERouter

func (*GAERouter) SetCommonResponseHeader added in v0.1.7

func (gae *GAERouter) SetCommonResponseHeader(w http.ResponseWriter)

func (*GAERouter) Start

func (gae *GAERouter) Start()

type GithubWebhook

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

func NewGithubWebhook

func NewGithubWebhook(sender SenderInterface) *GithubWebhook

type Sender

type Sender struct {
}

func NewSender

func NewSender() *Sender

func (*Sender) SendMessage

func (s *Sender) SendMessage(msg string)

type SenderInterface

type SenderInterface interface {
	SendMessage(msg string)
}

Jump to

Keyboard shortcuts

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