utils

package
v0.0.0-...-4cd4f46 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ART_SECURITY_FOLDER = "security/"
	TS_FORMAT           = "2006-01-02T15:04:05.000Z"
)

Variables

This section is empty.

Functions

func AddTrailingSlashIfNeeded

func AddTrailingSlashIfNeeded(path string) string

func BaseDirectory

func BaseDirectory() string

func CheckReqParams

func CheckReqParams(source model.Source) error

func CheckReqParamsWithPattern

func CheckReqParamsWithPattern(source model.Source) error

func Fatal

func Fatal(message string, args ...interface{})

func HashFile

func HashFile(path string, hasher hash.Hash) (string, error)

func Log

func Log(format string, args ...interface{})

func OverrideLoggerArtifactory

func OverrideLoggerArtifactory(logLevel string)

func RemoveStartingSlashIfNeeded

func RemoveStartingSlashIfNeeded(path string) string

func RetrieveArtDetails

func RetrieveArtDetails(source model.Source) (*config.ServerDetails, error)

func RetrieveJsonRequest

func RetrieveJsonRequest(v interface{}) error

func SendJsonResponse

func SendJsonResponse(v interface{}) error

func TransfertDetailsToMeta

func TransfertDetailsToMeta(result *cmdutils.Result) []model.Metadata

Types

type Filter

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

func NewFilter

func NewFilter(filter string) *Filter

func (*Filter) Less

func (f *Filter) Less(v1 string, v2 string) bool

func (*Filter) Match

func (f *Filter) Match(name string, modified_at string) (bool, string)

Jump to

Keyboard shortcuts

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