utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(scheme *runtime.Scheme) (client.Client, error)

func FileExists

func FileExists(path string) bool

func GetGitCli

func GetGitCli(cfg *cicdv1.IntegrationConfig) (git.Client, error)

func Namespace

func Namespace() (string, error)

func ParseApproversList

func ParseApproversList(str string) ([]string, error)

func ParseEmailFromUsers

func ParseEmailFromUsers(users []string) []string

func RandomString

func RandomString(length int) string

RandomString generate random string with lower case alphabets and digits

func RespondError

func RespondError(w http.ResponseWriter, code int, msg string) error

func RespondJSON

func RespondJSON(w http.ResponseWriter, data interface{}) error

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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