util

package
v0.0.0-...-304499e Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DatabaseVersion = 24
View Source
const MaximumTypeSizeIndex = 2500
View Source
const ModePermRW = 0600

ModePermRW is the umask "-rw-------".

View Source
const ModePermRWX = 0700

ModePermRWX is the umask "-rwx------".

Variables

View Source
var MetadbVersion = "(unknown version)"

MetadbVersion is defined at build time via -ldflags.

Functions

func CompileRegexps

func CompileRegexps(strs []string) ([]*regexp.Regexp, error)

func ConfigFileName

func ConfigFileName(datadir string) string

func DecodeCamelCase

func DecodeCamelCase(s string) (string, error)

DecodeCamelCase parses a camel case string into all-lowercase words separated by underscores. A sequence of uppercase letters is interpreted as a word, except that the last uppercase letter of a sequence is considered the start of a new word if it is followed by a lowercase letter.

func FileExists

func FileExists(f string) (bool, error)

FileExists returns true if f is an existing file or directory.

func KafkaMessageString

func KafkaMessageString(m *kafka.Message) string

func MatchRegexps

func MatchRegexps(res []*regexp.Regexp, s string) bool

func ReadConfigDatabase

func ReadConfigDatabase(datadir string) (*dbx.DB, error)

func SplitList

func SplitList(list string) []string

SplitList splits a comma-separated list and trims white space from each element.

func SysdbFileName

func SysdbFileName(datadir string) string

func SystemDirName

func SystemDirName(datadir string) string

func SystemPIDFileName

func SystemPIDFileName(datadir string) string

func UserPerm

func UserPerm(relist *RegexList, table *dbx.Table) bool

Types

type RegexList

type RegexList struct {
	String string
	Regex  []*regexp.Regexp
}

Jump to

Keyboard shortcuts

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