utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteCountDecimal added in v1.1.1

func ByteCountDecimal(b int64) string

func ExtractPattern added in v1.3.0

func ExtractPattern(input string) (*regexp.Regexp, error)

func FunctionName

func FunctionName(i interface{}) string

Returns the name and package/module path of the given function.

func InitConfig

func InitConfig(cfg *GlobalConfig)

Initialize the global configuration with given config.

func RepoName

func RepoName(repo *git.Repository) string

Returns the name of the given repository. Usually derived from its first remote.

Types

type CheckResultConsolidated added in v1.1.1

type CheckResultConsolidated struct {
	Date       time.Time     `json:"date"`
	Repository string        `json:"repository"`
	Error      string        `json:"error"`
	Checks     []SingleCheck `json:"checks"`
}

type GlobalConfig

type GlobalConfig struct {
	BranchPattern *regexp.Regexp
	NamePattern   *regexp.Regexp
	EmailPattern  *regexp.Regexp
}

func Config

func Config() GlobalConfig

Retrieve the global configuration.

type SearchRequestBody added in v1.3.0

type SearchRequestBody struct {
	Path       string   `json:"path"`
	CheckNames []string `json:"checkNames"`
}

type SingleCheck added in v1.1.1

type SingleCheck struct {
	Origin         string                 `json:"origin"`
	Branch         string                 `json:"branch"`
	CheckName      string                 `json:"checkName"`
	Acknowledged   bool                   `json:"acknowledged"`
	AdditionalInfo map[string]interface{} `json:"additionalInfo"`
}

Jump to

Keyboard shortcuts

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