conf

package
v0.0.0-...-2cebd77 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CORSConf = &cors{}

CORSConf 跨域资源共享配置

View Source
var DingTalkConf = &DingTalk{}
View Source
var GitLabHost string
View Source
var GitLabToken string
View Source
var ServerConf = &server{}

ServerConf 服务基本配置

View Source
var WebHookConf = &SSHConfig{}
View Source
var ZapConf = &Zap{}

Functions

func ParseWebHookConf

func ParseWebHookConf(conf map[string]interface{})

解析webhook相关配置参数

func Setup

func Setup()

Setup 生成服务配置

Types

type DingTalk

type DingTalk struct {
	AccessToken string
	Secret      string
	At          string
}

钉钉消息推送配置

type HookConfig

type HookConfig struct {
	Url  string
	Hook []*HostConfig
}

type HostConfig

type HostConfig struct {
	Host   string
	Port   int
	User   string
	Pwd    string
	Script string
}

主机脚本相关配置

type SSHConfig

type SSHConfig struct {
	WebHookMap map[string]*HookConfig
}

webhook配置

type Zap

type Zap struct {
	Level         string `mapstructure:"level"`
	Format        string `mapstructure:"format"`
	Prefix        string `mapstructure:"prefix"`
	Director      string `mapstructure:"director"`
	LinkName      string `mapstructure:"link-name"`
	ShowLine      bool   `mapstructure:"show-line"`
	EncodeLevel   string `mapstructure:"encode-level"`
	StacktraceKey string `mapstructure:"stacktrace-key"`
	LogInConsole  bool   `mapstructure:"log-in-console"`
}

Zap日志配置

Jump to

Keyboard shortcuts

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