Documentation ¶
Index ¶
- Constants
- func CheckIfError(err error)
- func GetEnv(key, fallback string) string
- func GetEnvInt(key string, fallback int) int
- func Init(repository *git.Repository, r kelly.Router, config *Config)
- func RemoveContents(dir string) error
- type Commit
- type Config
- type Current
- type GitlabHookNotify
- type Global
- type Spec
- type User
Constants ¶
View Source
const ( LOCAL_DIR = "/tmp/data" GIT_ORIGIN = "https://github.com/qjw/test.git" SWAGGER_UI = "/tmp/swagger_ui" FRONTEND = "/tmp/frontend" PORT = 8888 GITLAB_TOKEN = "" )
Variables ¶
This section is empty.
Functions ¶
func CheckIfError ¶
func CheckIfError(err error)
func RemoveContents ¶
Types ¶
type Config ¶
type Config struct { LocalDir string `json:"localDir"` // 如果不存在,则不从远程Clone GitOrigin string `json:"gitOrigin"` SwaggetUi string `json:"swaggerUI"` Frontend string `json:"frontend"` Port int `json:"port"` // gitlab/github hook GitlabToken string `json:"gitlabToken"` }
func InitConfig ¶
func InitConfig() *Config
type GitlabHookNotify ¶
type GitlabHookNotify struct { ObjectKind string `json:"object_kind"` // push event EventName string `json:"event_name,omitempty"` Ref string `json:"ref,omitempty"` CheckoutSha string `json:"checkout_sha,omitempty"` TotalCommitsCount int `json:"total_commits_count,omitempty"` Name string `json:"user_name,omitempty"` Email string `json:"user_email,omitempty"` AvatarUrl string `json:"user_avatar,omitempty"` User User `json:"user"` }
Click to show internal directories.
Click to hide internal directories.