github_webhook_action

package module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 12 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(logLevelString string, isJson bool)

func LoadConfig

func LoadConfig()

Types

type ConfigTOML

type ConfigTOML struct {
	Name      string `toml:"Name"`
	BuildTime string `toml:"BuildTime"`
	Server    struct {
		Port             int    `toml:"Port"`
		LogLevel         string `toml:"LogLevel"`
		LogIsJSONFormat  bool   `toml:"LogIsJsonFormat"`
		WebhookSecretKey string `toml:"WebhookSecretKey"`
	} `toml:"server"`
	Action struct {
		API struct {
			Enable bool   `toml:"Enable"`
			Mothod string `toml:"Mothod"`
			Auth   string `toml:"Auth"`
			URL    string `toml:"URL"`
		} `toml:"api"`
		Target []struct {
			RepoName    string `toml:"RepoName"`
			TargetID    int    `toml:"TargetID"`
			RequestBody string `toml:"RequestBody"`
		} `toml:"target"`
	} `toml:"action"`
}
var Conf ConfigTOML

type GAERouter

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

func NewGAERouter

func NewGAERouter(gwh *GithubWebhook) *GAERouter

func (*GAERouter) Start

func (gae *GAERouter) Start()

type GinRouter

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

func NewGinRouter

func NewGinRouter(gwh *GithubWebhook) *GinRouter

func (*GinRouter) Start

func (gr *GinRouter) 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