Documentation ¶
Index ¶
- Constants
- Variables
- func AESDecrypt(key []byte, securemess string) (decodedmess string, err error)
- func AESEncrypt(key []byte, message string) (encmess string, err error)
- func AddShutdownHook(f func())
- func App() *application
- func AppFilename(newExt string) string
- func AppRestart()
- func AuthenticateCookie(context echo.Context, password string, timeout time.Duration) error
- func BindForm(context echo.Context, data interface{}, bodyLimit int) error
- func CalcFileMode(owner FilePermission, group FilePermission, public FilePermission) os.FileMode
- func Capitalize(txt string) string
- func CertificateAsPEM(tlsCertificate *tls.Certificate) []byte
- func CertificateInfoFromConnection(con *tls.Conn) (string, error)
- func CheckCookieAuthenticated(context echo.Context, password string) error
- func CleanPath(path string) string
- func Clear(v interface{}) error
- func ClearDate(v time.Time) time.Time
- func ClearTime(v time.Time) time.Time
- func CmdToString(cmd *exec.Cmd) string
- func CompareDate(t1 time.Time, t2 time.Time) time.Duration
- func CompareIgnoreCase(s0 string, s1 string) bool
- func CompareTime(t1 time.Time, t2 time.Time) time.Duration
- func ContainsWildcard(s string) bool
- func ConvertToOSspecificLF(s string) string
- func CopyBuffer(cancel context.CancelFunc, name string, writer io.Writer, reader io.Reader, ...) (int64, error)
- func CountRunes(s string) int
- func CreateI18nFile(path string, objs ...interface{}) error
- func CreateTempDir() (string, error)
- func CreateTempFile() (file *os.File, err error)
- func CreateTlsConfig(password string) (*tls.Config, error)
- func DeadlineByDuration(duration time.Duration) time.Time
- func DeadlineByMsec(msec int) time.Time
- func Debug(t string, arg ...interface{})
- func DebugError(err error) bool
- func DebugFunc(arg ...interface{})
- func DecryptString(key []byte, txt string) (string, error)
- func DeepCopy(dst interface{}, src interface{}) error
- func DefaultConsoleEncoding() string
- func DefaultEncoding() string
- func DisableCookie(context echo.Context) error
- func Discover(address string, timeout time.Duration, uid string) (map[string]string, error)
- func Done()
- func DurationToMillisecond(d time.Duration) int
- func EncryptString(key []byte, txt string) (string, error)
- func EqualWildcards(s, mask string) (bool, error)
- func Error(err error) bool
- func Eval(b bool, trueFunc interface{}, falseFunc interface{}) interface{}
- func Exit(code int)
- func ExitOrError(err error) error
- func ExtractNumber(txt string) (float64, error)
- func FileBackup(filename string) error
- func FileCopy(src string, dst string) error
- func FileDate(filename string) (time.Time, error)
- func FileDelete(filename string) error
- func FileExists(filename string) bool
- func FileMode(read, write, execute bool) os.FileMode
- func FileName(filename string) string
- func FileNameExt(filename string) string
- func FileNamePart(filename string) string
- func FileSize(filename string) (int64, error)
- func FileStore(filename string, r io.Reader) error
- func FillString(txt string, length int, asPrefix bool, add string) string
- func FindFreePort(network string, startPort int, excludedPorts []int) (int, error)
- func FormatMemory(mem int64) string
- func GenerateRandomBytes(n int) ([]byte, error)
- func GenerateRandomString(s int) (string, error)
- func GetConfigurationBuffer() ([]byte, error)
- func GetHost() (net.IP, string, error)
- func GetHostAddrs(inclLocalhost bool, remote net.IP) ([]hostAddress, error)
- func GetHostInterface(ip net.IP) (*net.Interface, net.Addr, error)
- func GetLanguages() ([]string, error)
- func GetOutboundIP() (net.IP, error)
- func GetSystemLanguage() (string, error)
- func GoRoutineId() uint64
- func GoogleTranslate(googleApiKey string, text string, foreignLanguage string) (string, error)
- func Hack4BrowserUpdate() string
- func HandleCopyBufferError(written int64, err error) (int64, error)
- func Ignore(arg ...interface{}) bool
- func IndexOf(slice interface{}, search interface{}) int
- func Info(t string, arg ...interface{})
- func Init(isService bool, version string, git string, build string, date string, ...)
- func InitConfiguration() error
- func InitTesting(v goTesting)
- func IsCertificateSelfSigned(cert *x509.Certificate) bool
- func IsCookieAuthenticated(context echo.Context, password string) bool
- func IsDirectory(path string) bool
- func IsErrExit(err error) bool
- func IsErrNetClosing(err error) bool
- func IsErrUnexpectedEOF(err error) bool
- func IsFile(path string) bool
- func IsFileReadOnly(path string) bool
- func IsFlagSetOnArgs(fn string) bool
- func IsImageMimeType(s string) bool
- func IsLinuxOS() bool
- func IsLocalhost(ip net.IP) bool
- func IsMacOS() bool
- func IsOneTimeFlag(n string) bool
- func IsPortAvailable(network string, port int) (bool, error)
- func IsPrivateIP(ip string) (bool, error)
- func IsRunningAsExecutable() bool
- func IsRunningAsService() bool
- func IsRunningInteractive() bool
- func IsStringEnrypted(password string) bool
- func IsSuppressedError(err error) bool
- func IsSuppressedErrorMessage(err string) bool
- func IsSymbolicLink(path string) bool
- func IsTTYDevice(device string) bool
- func IsWindowsOS() bool
- func IterateStruct(data interface{}, ...) error
- func Join(strs []string, sep string) string
- func Logs(w io.Writer) error
- func LogsAvailable() bool
- func Max(v ...int) int
- func MillisecondToDuration(msec int) time.Duration
- func Min(v ...int) int
- func MultiRunner(runners []Runner) error
- func NewButton(parent *etree.Element, primary bool, actionItem ActionItem) *etree.Element
- func NewDeadlineReader(reader io.Reader, timeout time.Duration) io.Reader
- func NewEchoLogger() echoLogger
- func NewEndpoint(device string, isClient bool, tlsConfig *tls.Config) (Endpoint, EndpointConnector, error)
- func NewForm(parent *etree.Element, caption string, data interface{}, method string, ...) (*etree.Element, *etree.Element, error)
- func NewLineBuffer(count int, f func(string) string) *lineBuffer
- func NewMenu(page *Webpage, menuItems []ActionItem, selectedTitle string, ...)
- func NewRentrantMutex() reentrantmutex
- func NewTable(parent *etree.Element, cells [][]string) *etree.Element
- func NewThrottledReader(reader io.Reader, bytesPerSecs int) io.Reader
- func NewThrottledWriter(writer io.Writer, bytesPerSecs int) io.Writer
- func NewTimeoutOperation(checkDuration time.Duration, maxDuration time.Duration, fn func() error) error
- func NewTimeoutReader(reader io.Reader, timeout time.Duration, initalTimeout bool) io.Reader
- func NewTimeoutWriter(writer io.Writer, timeout time.Duration, initalTimeout bool) io.Writer
- func NewTlsConfig(certificateVerify bool, serverName string, minVersion string, ...) (*tls.Config, error)
- func NewTlsConfigFromFlags() (*tls.Config, error)
- func Panic(err error)
- func ParseDateTime(mask string, v string) (time.Time, error)
- func ParseJsonDateTime(v string) (time.Time, error)
- func ParseMemory(txt string) (int64, error)
- func PrivateKeyAsPEM(privateKey *rsa.PrivateKey) []byte
- func PullFlash(context echo.Context, flashName string) []string
- func PushFlash(context echo.Context, flashName string, flash string) error
- func ReadHeader(path string) ([]byte, error)
- func ReadJsonFile(filename string, v interface{}) error
- func ReadResource(filename string) ([]byte, string, error)
- func ReflectStructField(Iface interface{}, FieldName string) (*reflect.Value, error)
- func ReflectStructMethod(Iface interface{}, MethodName string) (*reflect.Value, error)
- func RefreshCookie(context echo.Context, timeout time.Duration) error
- func RegisterGoRoutine() int
- func RegisteredGoRoutines(f func(id int, ri RuntimeInfo))
- func RemoveJsonComments(s string) string
- func ResetConfiguration() error
- func ResourcesDirectory() string
- func Rnd(max int) int
- func Run(mandatoryFlags []string)
- func Rune(s string, index int) (rune, error)
- func ScanLinesWithLF(data []byte, atEOF bool) (advance int, token []byte, err error)
- func SessionId(context echo.Context) string
- func SetConfiguration(cfg interface{}) error
- func SetFileReadOnly(path string, readonly bool) (err error)
- func SetLanguage(lang string) error
- func SetTime(t time.Time, f string, v int) time.Time
- func Shortener(s string, max int) string
- func SortStringsCaseInsensitive(strs []string)
- func SplitWithQuotation(txt string) []string
- func StillAlive(pid int) bool
- func SurroundWith(str []string, prefixSuffix string) []string
- func TempDir() string
- func Title() string
- func TitleVersion(major bool, minor bool, patch bool) string
- func TlsCertificateInfos(tlsConfig *tls.Config) (string, error)
- func TlsCipherDescription(cs *tls.CipherSuite) string
- func TlsCipherNames(ciphers []*tls.CipherSuite) []string
- func TlsCipherSelectionsToIds(s string) []uint16
- func TlsCiphersIds(ciphers []*tls.CipherSuite) []uint16
- func TlsConfigFromBuffer(ba []byte, password string) (*tls.Config, error)
- func TlsConfigFromFile(filename string, password string) (*tls.Config, error)
- func TlsConfigFromPEM(certPEM []byte, keyPEM []byte, password string) (*tls.Config, error)
- func TlsConfigToP12(tlsConfig *tls.Config, password string) ([]byte, error)
- func TlsDebugConnection(typ string, tlsConn *tls.Conn)
- func TlsDefaultCiphers() []*tls.CipherSuite
- func TlsDescriptionToCipher(name string) *tls.CipherSuite
- func TlsIdToCipher(id uint16) *tls.CipherSuite
- func TlsIdToVersion(id uint16) string
- func TlsToX509Certificate(certificate []byte) (*x509.Certificate, error)
- func TlsVersionToId(s string) uint16
- func TlsVersions() []string
- func ToBool(s string) bool
- func ToStrings(slice interface{}) ([]string, error)
- func ToTime(v asDateTime) time.Time
- func ToUTF8(r io.Reader, cs string) ([]byte, error)
- func ToUTF8String(s string, cs string) (string, error)
- func Translate(msg string, args ...interface{}) string
- func TranslateFor(language, msg string) string
- func Trim4Path(path string) string
- func TruncateTime(t time.Time, f string) time.Time
- func URLGet(url string) ([]byte, error)
- func UnregisterGoRoutine(id int)
- func Unzip(dest, src string) error
- func VerifyP12(ba []byte, password string) (privateKey *rsa.PrivateKey, certificate *x509.Certificate, ...)
- func Version(major bool, minor bool, patch bool) string
- func WaitUntilNetworkIsAvailable() error
- func WalkFilepath(filemask string, recursive bool, ignoreError bool, ...) error
- func Warn(t string, arg ...interface{})
- func WarnError(err error) bool
- func WatchdogCmd(cmd *exec.Cmd, timeout time.Duration) error
- func WatchdogFunc(msg string, fn func() error, timeout time.Duration) error
- func WriteJsonFile(filename string, v interface{}, fileMode os.FileMode) error
- func X509toTlsCertificate(certificate *x509.Certificate, privateKey *rsa.PrivateKey) (*tls.Certificate, error)
- func Zip(filename string, targets []ZipTarget) error
- type ActionItem
- type AllEvents
- type ChannelError
- type Configuration
- type DeadlineReader
- type DiscoverServer
- type Endpoint
- type EndpointConnector
- type ErrExit
- type ErrFileAlreadyExists
- type ErrFileIsEmpty
- type ErrFileNotFound
- type ErrInvalidType
- type ErrTimeout
- type ErrWatchdog
- type Event
- type EventChan
- type EventConfigurationReset
- type EventFlagsParsed
- type EventFlagsSet
- type EventFunc
- type EventManager
- func (this *EventManager) DestroyChanReceiver(eventChan EventChan)
- func (this *EventManager) DestroyFuncReceiver(eventFunc *EventFunc)
- func (this *EventManager) Emit(event interface{}) bool
- func (this *EventManager) NewChanReceiver(event interface{}) EventChan
- func (this *EventManager) NewFuncReceiver(event interface{}, eventFunc EventFunc) *EventFunc
- type EventRestart
- type EventType
- type FilePermission
- type FuncFieldIterator
- type Jason
- func (jason *Jason) Array(key string, index int) (*Jason, error)
- func (jason *Jason) ArrayCount(key string) int
- func (jason *Jason) Bool(key string, def ...bool) (result bool, err error)
- func (jason *Jason) Count() int
- func (jason *Jason) Element(key string) (*Jason, error)
- func (jason *Jason) Elements() []string
- func (jason *Jason) Exists(key string) bool
- func (jason *Jason) Int(key string, def ...int) (result int, err error)
- func (jason *Jason) IsArray(key string) bool
- func (jason *Jason) IsBool(key string) bool
- func (jason *Jason) IsInt(key string) bool
- func (jason *Jason) IsString(key string) bool
- func (jason *Jason) Pretty() (string, error)
- func (jason *Jason) String(key string, def ...string) (string, error)
- type KeyValue
- type KeyValues
- func (kvs *KeyValues) Add(key string, value string) error
- func (kvs *KeyValues) Clear()
- func (kvs *KeyValues) Contains(key string) bool
- func (kvs *KeyValues) Get(key string) (string, error)
- func (kvs *KeyValues) Index(key string) int
- func (kvs *KeyValues) Keys() []string
- func (kvs *KeyValues) Put(key string, value string) error
- func (kvs *KeyValues) Remove(key string) (string, error)
- func (kvs *KeyValues) Sort()
- func (kvs *KeyValues) Values() []string
- type MimetypeExtension
- type ModuleInfo
- type MultiValueFlag
- type NetworkClient
- type NetworkConnection
- type NetworkServer
- type Notice
- type OrderedMap
- func (o *OrderedMap) Clear() *OrderedMap
- func (o *OrderedMap) Delete(key interface{}) *OrderedMap
- func (o *OrderedMap) Get(key interface{}) (interface{}, bool)
- func (o *OrderedMap) Keys() []interface{}
- func (o *OrderedMap) Len() int
- func (o *OrderedMap) Set(key interface{}, value interface{}) *OrderedMap
- func (o *OrderedMap) SetMap(m ...interface{}) *OrderedMap
- type Quantum
- func (q *Quantum) Add(v int)
- func (q *Quantum) AddQuantum(other *Quantum)
- func (q *Quantum) AddRange(from int, to int)
- func (q *Quantum) Get(index int) (int, error)
- func (q *Quantum) IsIncluded(v int) bool
- func (q *Quantum) Len() int
- func (q *Quantum) Remove(v int)
- func (q *Quantum) RemoveAll()
- func (q *Quantum) RemoveQuantum(other *Quantum)
- func (q *Quantum) RemoveRange(from int, to int)
- func (q *Quantum) String() string
- func (q *Quantum) ToSlice() []int
- type RandomReader
- type Runner
- type RuntimeInfo
- type SystemInfo
- type TTY
- type TTYConnection
- type TimeoutReader
- type TimeoutWriter
- type Webpage
- type ZeroReader
- type ZipTarget
Constants ¶
const ( APACHE string = "https://www.apache.org/licenses/LICENSE-2.0.html" GPL2 string = "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html" SERVICE_SIMULATE = "simulate" SERVICE_START = "start" SERVICE_STOP = "stop" SERVICE_RESTART = "restart" SERVICE_INSTALL = "install" SERVICE_UNINSTALL = "uninstall" )
const ( FlagNameAppProduct = "app.product" FlagNameService = "service" FlagNameServiceUsername = "service.username" FlagNameServicePassword = "service.password" FlagNameServiceTimeout = "service.timeout" FlagNameUsage = "?" FlagNameUsageMd = "?md" FlagNameNoBanner = "nb" )
const ( MaxUint = ^uint(0) MinUint = 0 MaxInt = int(MaxUint >> 1) MinInt = -MaxInt - 1 )
const ( FlagNameCfgFile = "cfg.file" FlagNameCfgReset = "cfg.reset" )
const ( //Year parse mask Year = "2006" //Month parse mask Month = "01" //Day parse mask Day = "02" //Hour parse mask Hour = "15" //Minute parse mask Minute = "04" //Second parse mask Second = "05" //Milli parse mask Msec = ".000" //DateSeparator parse mask DateSeparator = "." //TimeSeparator parse mask TimeSeparator = ":" //Separator parse mask Separator = " " )
const ( DEFAULT_LANGUAGE = "en" FlagNameAppLanguage = "app.language" )
const ( FlagNameIoNetworkTimeout = "io.network.timeout" FlagNameIoFileBackups = "io.file.backups" )
const ( LEVEL_PROLOG = iota LEVEL_DEBUG LEVEL_INFO LEVEL_WARN LEVEL_ERROR LEVEL_PANIC )
const ( FlagNameLogFileName = "log.file" FlagNameLogFileSize = "log.filesize" FlagNameLogVerbose = "log.verbose" FlagNameLogIO = "log.io" FlagNameLogJson = "log.json" FlagNameLogSys = "log.sys" )
const ( LOCALHOST_IP4 = "127.0.0.1" LOCALHOST_IP6 = "::1" )
const ( FlagNameTlsInsecure = "tls.insecure" FlagNameTlsVerify = "tls.verify" FlagNameTlsServername = "tls.servername" FlagNameTlsMinVersion = "tls.minversion" FlagNameTlsMaxVersion = "tls.maxversion" FlagNameTlsCiphers = "tls.ciphers" FlagNameTlsPassword = "tls.password" FlagNameTlsCertificate = "tls.certificate" FlagNameTlsMutual = "tls.mutual" )
const ( TlsVersion10 = "TLS1.0" TlsVersion11 = "TLS1.1" TlsVersion12 = "TLS1.2" TlsVersion13 = "TLS1.3" )
const ( BIG5 = "big5" IBM437 = "ibm437" IBM850 = "ibm850" IBM866 = "ibm866" ISO_8859_1 = "iso-8859-1" ISO_8859_10 = "iso-8859-10" ISO_8859_2 = "iso-8859-2" ISO_8859_3 = "iso-8859-3" ISO_8859_4 = "iso-8859-4" ISO_8859_5 = "iso-8859-5" ISO_8859_6 = "iso-8859-6" ISO_8859_7 = "iso-8859-7" ISO_8859_8 = "iso-8859-8" ISO_8859_9 = "iso-8859-9" KOI8_R = "koi8-r" US_ASCII = "us-ascii" UTF_16 = "utf-16" UTF_16BE = "utf-16be" UTF_16LE = "utf-16le" UTF_8 = "utf-8" WINDOWS_1250 = "windows-1250" WINDOWS_1251 = "windows-1251" WINDOWS_1252 = "windows-1252" )
const ( OPTION_FILE = "file" OPTION_HIDDEN = "hidden" OPTION_SELECT = "select" OPTION_MULTISELECT = "multiselect" OPTION_DATALIST = "datalist" OPTION_PASSWORD = "password" OPTION_AUTOFOCUS = "autofocus" OPTION_REQUIRED = "required" OPTION_READONLY = "readonly" OPTION_MULTILINE = "multiline" OPTION_MEGALINE = "megaline" OPTION_NOLABEL = "nolabel" OPTION_EXPERTVIEW = "expertview" OPTION_NOPLACEHOLDER = "noplaceholder" INPUT_WIDTH_NORMAL = "pure-input-1-4" INPUT_WIDTH_WIDE = "pure-input-2-4" CSS_DIALOG_CONTENT = "css-dialog-content pure-controls" CSS_DEFAULT_CONTENT = "css-default-content pure-controls" CSS_ERROR_BOX = "css-error-box" CSS_WARNING_BOX = "css-warning-box blink" CSS_SUCCESS_BOX = "css-success-box" CSS_VERTICAL_DIV = "css-vertical-div" CSS_LOGVIEWER = "css-logviewer" CSS_CONTENT = "css-content" CSS_CHECKLIST = "css-checklist" CSS_CHECKLIST_CHECKBOX = "css-checklist-checkbox" CSS_CHECKBOX = "css-checkbox" CSS_BUTTON_GROUP = "css-button-group" CSS_BORDER = "css-border" CSS_COLOR_OFF = "#CFCFCF" CSS_COLOR_ON = "MediumSeaGreen" FLASH_WARNING = "warning-flash" FLASH_ERROR = "error-flash" FLASH_SUCCESS = "success-flash" COOKIE_PASSWORD = "password" COOKIE_EXPIRE = "expire" FLASH_TIMEOUT = time.Second )
const (
MimetypeHeaderLen = 1024
)
const UNKNOWN = "unknwon"
Variables ¶
var ( FlagAppProduct *string FlagService *string FlagServiceUser *string FlagServicePassword *string FlagServiceStartTimeout *int FlagUsage *bool FlagUsageMd *bool FlagNoBanner *bool )
var ( FlagCfgReset *bool FlagCfgFile *string )
var ( ReadOnlyFileMode = FileMode(true, true, false) DefaultFileMode = FileMode(true, true, false) DefaultDirMode = FileMode(true, true, true) FlagIoNetworkTimeout *int FlagIoFileBackups *int )
var ( FlagLogVerbose *bool FlagLogIO *bool FlagLogFileName *string FlagLogFileSize *int FlagLogJson *bool FlagLogSys *bool )
var ( FlagTlsInsecure *bool FlagTlsVerify *bool FlagTlsServername *string FlagTlsMinVersion *string FlagTlsMaxVersion *string FlagTlsCiphers *string FlagTlsPassword *string FlagTlsCertificate *string FlagTlsMutual *string )
var DateMask = Day + DateSeparator + Month + DateSeparator + Year
DateMask parses only for date values
var DateMaskFilename = Year + "-" + Month + "-" + Day
DateMaskFilena,e parses for date value for file names
var DateTimeMask = DateMask + Separator + TimeMask
DateTimeMask parses for date and time values
var DateTimeMilliMask = DateMask + Separator + TimeMask + Msec
DateTimeMask parses for date and time values
var (
FlagLanguage *string
)
var (
MEMORY_UNITS = []string{"Bytes", "KB", "MB", "GB", "TB"}
)
var Mimetypes []MimetypeExtension
var TimeMask = Hour + TimeSeparator + Minute + TimeSeparator + Second
TimeMask parses only for time values
Functions ¶
func AESDecrypt ¶ added in v1.1.15
func AESEncrypt ¶ added in v1.1.15
func AddShutdownHook ¶
func AddShutdownHook(f func())
func AppFilename ¶ added in v1.1.15
func AppRestart ¶ added in v1.1.15
func AppRestart()
func AuthenticateCookie ¶ added in v1.1.15
func CalcFileMode ¶ added in v1.1.15
func CalcFileMode(owner FilePermission, group FilePermission, public FilePermission) os.FileMode
func CertificateAsPEM ¶ added in v1.1.84
func CertificateAsPEM(tlsCertificate *tls.Certificate) []byte
func CertificateInfoFromConnection ¶ added in v1.1.15
func CheckCookieAuthenticated ¶ added in v1.2.26
func CmdToString ¶ added in v1.1.20
func CompareDate ¶
EqualDateTime checks for equality of parts
func CompareIgnoreCase ¶
CompareIgnoreCase compares strings for equality ignoring case
func CompareTime ¶
EqualTime checks for equality of time
func ContainsWildcard ¶
func ConvertToOSspecificLF ¶
func CopyBuffer ¶ added in v1.1.104
func CountRunes ¶ added in v1.1.15
func CreateI18nFile ¶ added in v1.1.15
func CreateTempFile ¶
CreateTempFile creates a temporary file
func DeadlineByDuration ¶ added in v1.1.15
func DeadlineByMsec ¶ added in v1.1.15
func DefaultConsoleEncoding ¶
func DefaultConsoleEncoding() string
func DefaultEncoding ¶
func DefaultEncoding() string
func DisableCookie ¶ added in v1.1.21
func DisableCookie(context echo.Context) error
func DurationToMillisecond ¶ added in v1.1.55
func EqualWildcards ¶
func ExitOrError ¶ added in v1.1.15
func ExtractNumber ¶ added in v1.1.15
func FileDelete ¶ added in v1.1.0
FileDelete does ... guess what :-)
func FileNameExt ¶
Returns the filename extension without part "test.txt" -> ".txt"
func FileNamePart ¶
Returns the filename part without extension "test.txt" -> "test"
func FillString ¶ added in v1.1.15
func FindFreePort ¶ added in v1.1.15
func FormatMemory ¶ added in v1.1.15
func GenerateRandomBytes ¶ added in v1.1.15
GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateRandomString ¶ added in v1.1.15
GenerateRandomString returns a URL-safe, base64 encoded securely generated random string.
func GetConfigurationBuffer ¶ added in v1.1.15
func GetHostAddrs ¶ added in v1.1.46
func GetHostInterface ¶ added in v1.1.46
func GetLanguages ¶ added in v1.1.15
GetLanguages lists all available languages
func GetOutboundIP ¶ added in v1.1.98
func GetSystemLanguage ¶ added in v1.1.15
GetSystemLanguage return BCP 47 standard language name
func GoRoutineId ¶ added in v1.2.7
func GoRoutineId() uint64
func GoogleTranslate ¶ added in v1.1.15
func Hack4BrowserUpdate ¶ added in v1.1.15
func Hack4BrowserUpdate() string
func HandleCopyBufferError ¶ added in v1.2.3
func InitConfiguration ¶ added in v1.1.89
func InitConfiguration() error
func InitTesting ¶ added in v1.1.21
func InitTesting(v goTesting)
func IsCertificateSelfSigned ¶ added in v1.1.19
func IsCertificateSelfSigned(cert *x509.Certificate) bool
func IsCookieAuthenticated ¶ added in v1.1.15
func IsDirectory ¶
IsDirectory checks if the path leads to a directory
func IsErrNetClosing ¶ added in v1.1.19
func IsErrUnexpectedEOF ¶ added in v1.1.20
func IsFileReadOnly ¶
IsFileReadOnly checks if a file is read only
func IsFlagSetOnArgs ¶ added in v1.2.18
IsFlagSetOnArgs reports back all really set flags on the command line. Go's flag.Visit() gives back also the flags which have been set before by "flag.Set(..."
func IsImageMimeType ¶ added in v1.1.0
func IsLocalhost ¶ added in v1.1.20
func IsOneTimeFlag ¶ added in v1.1.23
func IsPortAvailable ¶ added in v1.1.15
func IsPrivateIP ¶ added in v1.1.69
func IsRunningAsExecutable ¶ added in v1.1.15
func IsRunningAsExecutable() bool
func IsRunningAsService ¶ added in v1.1.15
func IsRunningAsService() bool
func IsRunningInteractive ¶ added in v1.1.15
func IsRunningInteractive() bool
func IsStringEnrypted ¶ added in v1.1.15
func IsSuppressedError ¶ added in v1.1.21
func IsSuppressedErrorMessage ¶ added in v1.1.21
func IsSymbolicLink ¶
IsSymbolicLink checks if the path leads to symbolic link
func IsTTYDevice ¶ added in v1.1.106
func IterateStruct ¶ added in v1.1.15
func LogsAvailable ¶ added in v1.1.15
func LogsAvailable() bool
func MillisecondToDuration ¶ added in v1.1.15
func MultiRunner ¶ added in v1.1.15
func NewDeadlineReader ¶ added in v1.1.61
func NewEchoLogger ¶ added in v1.1.19
func NewEchoLogger() echoLogger
func NewEndpoint ¶ added in v1.1.106
func NewLineBuffer ¶ added in v1.1.15
func NewMenu ¶ added in v1.1.15
func NewMenu(page *Webpage, menuItems []ActionItem, selectedTitle string, disableMenues bool)
func NewRentrantMutex ¶ added in v1.1.77
func NewRentrantMutex() reentrantmutex
func NewThrottledReader ¶ added in v1.1.15
func NewThrottledWriter ¶ added in v1.1.15
func NewTimeoutOperation ¶ added in v1.1.30
func NewTimeoutReader ¶ added in v1.1.61
func NewTimeoutWriter ¶ added in v1.1.104
func NewTlsConfig ¶ added in v1.1.84
func NewTlsConfigFromFlags ¶ added in v1.1.84
func ParseDateTime ¶
ParseDateTime parses only date, but no time
func ParseJsonDateTime ¶ added in v1.1.21
ParseJsonDateTime parses only date, but no time
func ParseMemory ¶ added in v1.1.15
func PrivateKeyAsPEM ¶ added in v1.1.84
func PrivateKeyAsPEM(privateKey *rsa.PrivateKey) []byte
func ReadHeader ¶ added in v1.1.0
func ReadJsonFile ¶ added in v1.1.15
func ReflectStructField ¶ added in v1.1.15
func ReflectStructMethod ¶ added in v1.1.15
func RefreshCookie ¶ added in v1.1.15
func RegisterGoRoutine ¶ added in v1.1.108
func RegisterGoRoutine() int
func RegisteredGoRoutines ¶ added in v1.1.108
func RegisteredGoRoutines(f func(id int, ri RuntimeInfo))
func RemoveJsonComments ¶ added in v1.1.15
func ResetConfiguration ¶ added in v1.1.15
func ResetConfiguration() error
func ResourcesDirectory ¶ added in v1.1.96
func ResourcesDirectory() string
func ScanLinesWithLF ¶ added in v1.1.0
func SetConfiguration ¶ added in v1.1.45
func SetConfiguration(cfg interface{}) error
func SetFileReadOnly ¶
SetFileReadOnly sets file READ-ONLY yes or false
func SetLanguage ¶ added in v1.1.15
SetLanguage sets the language file to translation
func SortStringsCaseInsensitive ¶ added in v1.1.15
func SortStringsCaseInsensitive(strs []string)
func SplitWithQuotation ¶
SplitWithQuotation splits a sequented string by spaces and respects quotation
func StillAlive ¶ added in v1.1.3
func SurroundWith ¶
func TlsCertificateInfos ¶ added in v1.1.84
func TlsCipherDescription ¶ added in v1.1.84
func TlsCipherDescription(cs *tls.CipherSuite) string
func TlsCipherNames ¶ added in v1.1.84
func TlsCipherNames(ciphers []*tls.CipherSuite) []string
func TlsCipherSelectionsToIds ¶ added in v1.1.84
func TlsCiphersIds ¶ added in v1.1.84
func TlsCiphersIds(ciphers []*tls.CipherSuite) []uint16
func TlsConfigFromBuffer ¶ added in v1.1.84
func TlsConfigFromFile ¶ added in v1.1.84
the priority on entities inside p12 must be honored 1st private key 2nd computer certificate 3d..n CA certificates (will be ignored by app)
func TlsConfigFromPEM ¶ added in v1.1.84
func TlsConfigToP12 ¶ added in v1.1.84
func TlsDebugConnection ¶ added in v1.1.84
func TlsDefaultCiphers ¶ added in v1.1.84
func TlsDefaultCiphers() []*tls.CipherSuite
func TlsDescriptionToCipher ¶ added in v1.1.84
func TlsDescriptionToCipher(name string) *tls.CipherSuite
func TlsIdToCipher ¶ added in v1.1.84
func TlsIdToCipher(id uint16) *tls.CipherSuite
func TlsIdToVersion ¶ added in v1.1.21
func TlsToX509Certificate ¶ added in v1.1.84
func TlsToX509Certificate(certificate []byte) (*x509.Certificate, error)
func TlsVersionToId ¶ added in v1.1.21
func TlsVersions ¶ added in v1.1.21
func TlsVersions() []string
func TranslateFor ¶ added in v1.1.15
func UnregisterGoRoutine ¶ added in v1.1.108
func UnregisterGoRoutine(id int)
func VerifyP12 ¶ added in v1.1.15
func VerifyP12(ba []byte, password string) (privateKey *rsa.PrivateKey, certificate *x509.Certificate, caCerts []*x509.Certificate, err error)
func WaitUntilNetworkIsAvailable ¶ added in v1.2.4
func WaitUntilNetworkIsAvailable() error
func WalkFilepath ¶ added in v1.1.15
func WatchdogFunc ¶ added in v1.1.21
func WriteJsonFile ¶ added in v1.1.15
func X509toTlsCertificate ¶ added in v1.1.84
func X509toTlsCertificate(certificate *x509.Certificate, privateKey *rsa.PrivateKey) (*tls.Certificate, error)
Types ¶
type ActionItem ¶ added in v1.1.15
type ChannelError ¶
type ChannelError struct {
// contains filtered or unexported fields
}
func (*ChannelError) Add ¶
func (c *ChannelError) Add(err error)
func (*ChannelError) Exists ¶
func (c *ChannelError) Exists() bool
func (*ChannelError) Get ¶
func (c *ChannelError) Get() error
func (*ChannelError) GetAll ¶
func (c *ChannelError) GetAll() []error
type Configuration ¶ added in v1.1.15
type Configuration struct { ApplicationTitle string `json:"applicationTitle"` ApplicationVersion string `json:"applicationVersion"` Flags KeyValues `json:"flags"` }
func GetConfiguration ¶ added in v1.1.15
func GetConfiguration() (*Configuration, error)
func NewConfiguration ¶ added in v1.1.15
func NewConfiguration() *Configuration
type DeadlineReader ¶ added in v1.1.61
type DeadlineReader struct {
// contains filtered or unexported fields
}
type DiscoverServer ¶ added in v1.1.15
type DiscoverServer struct {
// contains filtered or unexported fields
}
func NewDiscoverServer ¶ added in v1.1.15
func (*DiscoverServer) Start ¶ added in v1.1.15
func (server *DiscoverServer) Start() error
func (*DiscoverServer) Stop ¶ added in v1.1.15
func (server *DiscoverServer) Stop() error
type EndpointConnector ¶ added in v1.1.106
type EndpointConnector func() (io.ReadWriteCloser, error)
type ErrFileAlreadyExists ¶ added in v1.1.107
type ErrFileAlreadyExists struct {
FileName string
}
func (*ErrFileAlreadyExists) Error ¶ added in v1.1.107
func (e *ErrFileAlreadyExists) Error() string
type ErrFileIsEmpty ¶ added in v1.2.4
type ErrFileIsEmpty struct {
FileName string
}
func (*ErrFileIsEmpty) Error ¶ added in v1.2.4
func (e *ErrFileIsEmpty) Error() string
type ErrFileNotFound ¶
type ErrFileNotFound struct {
FileName string
}
func (*ErrFileNotFound) Error ¶
func (e *ErrFileNotFound) Error() string
type ErrInvalidType ¶
type ErrInvalidType struct {
Msg string
}
func (*ErrInvalidType) Error ¶
func (e *ErrInvalidType) Error() string
type ErrTimeout ¶ added in v1.2.5
func (*ErrTimeout) Error ¶ added in v1.2.5
func (e *ErrTimeout) Error() string
type ErrWatchdog ¶ added in v1.1.3
type ErrWatchdog struct {
Msg string
}
func (*ErrWatchdog) Error ¶ added in v1.1.3
func (e *ErrWatchdog) Error() string
type EventConfigurationReset ¶ added in v1.1.15
type EventFlagsParsed ¶ added in v1.1.21
type EventFlagsParsed struct { }
type EventFlagsSet ¶ added in v1.1.22
type EventFlagsSet struct { }
type EventManager ¶ added in v1.1.15
type EventManager struct {
// contains filtered or unexported fields
}
var (
Events *EventManager
)
func NewEventManager ¶ added in v1.1.15
func NewEventManager() *EventManager
func (*EventManager) DestroyChanReceiver ¶ added in v1.1.15
func (this *EventManager) DestroyChanReceiver(eventChan EventChan)
func (*EventManager) DestroyFuncReceiver ¶ added in v1.1.15
func (this *EventManager) DestroyFuncReceiver(eventFunc *EventFunc)
func (*EventManager) Emit ¶ added in v1.1.15
func (this *EventManager) Emit(event interface{}) bool
func (*EventManager) NewChanReceiver ¶ added in v1.1.15
func (this *EventManager) NewChanReceiver(event interface{}) EventChan
func (*EventManager) NewFuncReceiver ¶ added in v1.1.15
func (this *EventManager) NewFuncReceiver(event interface{}, eventFunc EventFunc) *EventFunc
type EventRestart ¶ added in v1.1.89
type EventRestart struct { }
type FilePermission ¶ added in v1.1.15
type FuncFieldIterator ¶ added in v1.1.15
type Jason ¶
type Jason struct {
// contains filtered or unexported fields
}
func (*Jason) ArrayCount ¶
type KeyValues ¶ added in v1.2.16
type KeyValues []KeyValue
func NewKeyValues ¶ added in v1.2.17
type MimetypeExtension ¶ added in v1.1.15
type MimetypeExtension struct {
MimeType, Ext string
}
var ( MimetypeApplicationDicom, MimetypeApplicationEpubZip, MimetypeApplicationGeoJson, MimetypeApplicationGmlXml, MimetypeApplicationGpxXml, MimetypeApplicationGzip, MimetypeApplicationJar, MimetypeApplicationJavascript, MimetypeApplicationJson, MimetypeApplicationMsword, MimetypeApplicationOctetStream, MimetypeApplicationOgg, MimetypeApplicationPdf, MimetypeApplicationPostscript, MimetypeApplicationVndGarminTcxXml, MimetypeApplicationVndGoogleEarthKmlXml, MimetypeApplicationVndMsExcel, MimetypeApplicationVndMsPowerpoint, MimetypeApplicationVndOpenxmlformatsOfficedocumentPresentationmlPresentation, MimetypeApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, MimetypeApplicationVndOpenxmlformatsOfficedocumentWordprocessingmlDocument, MimetypeApplicationWasm, MimetypeApplicationX7ZCompressed, MimetypeApplicationXChromeExtension, MimetypeApplicationXJavaApplet, MimetypeApplicationXPhotoshop, MimetypeApplicationXPython, MimetypeApplicationXShockwaveFlash, MimetypeApplicationXTar, MimetypeApplicationZip, MimetypeAudioAiff, MimetypeAudioAmr, MimetypeAudioApe, MimetypeAudioBasic, MimetypeAudioFlac, MimetypeAudioMidi, MimetypeAudioMp4, MimetypeAudioMpeg, MimetypeAudioMusepack, MimetypeAudioWav, MimetypeAudioXM4A, MimetypeFontWoff, MimetypeFontWoff2, MimetypeImageBmp, MimetypeImageGif, MimetypeImageJpeg, MimetypeImagePng, MimetypeImageSvgXml, MimetypeImageTiff, MimetypeImageWebp, MimetypeImageXIcon, MimetypeModelVndColladaXml, MimetypeModelX3DXml, MimetypeTextHtml, MimetypeTextCss, MimetypeTextPlain, MimetypeTextRtf, MimetypeTextXml, MimetypeTextXLua, MimetypeTextXPerl, MimetypeTextXPhp, MimetypeTextXTcl, MimetypeVideo3GPP, MimetypeVideo3GPP2, MimetypeVideoMp4, MimetypeVideoMpeg, MimetypeVideoQuicktime, MimetypeVideoWebm, MimetypeVideoXFlv, MimetypeVideoXMatroska, MimetypeVideoXMsvideo MimetypeExtension )
func DetectMimeType ¶
func DetectMimeType(filename string, buf []byte) MimetypeExtension
type ModuleInfo ¶ added in v1.1.15
func CreateModuleInfo ¶ added in v1.1.15
func CreateModuleInfo() (*ModuleInfo, error)
type MultiValueFlag ¶ added in v1.1.19
type MultiValueFlag []string
func (*MultiValueFlag) Set ¶ added in v1.1.19
func (this *MultiValueFlag) Set(value string) error
func (*MultiValueFlag) String ¶ added in v1.1.19
func (this *MultiValueFlag) String() string
type NetworkClient ¶ added in v1.1.84
type NetworkClient struct {
// contains filtered or unexported fields
}
func NewNetworkClient ¶ added in v1.1.84
func NewNetworkClient(address string, tlsConfig *tls.Config) (*NetworkClient, error)
func (*NetworkClient) Connect ¶ added in v1.1.84
func (networkClient *NetworkClient) Connect() (*NetworkConnection, error)
func (*NetworkClient) Start ¶ added in v1.1.84
func (networkClient *NetworkClient) Start() error
func (*NetworkClient) Stop ¶ added in v1.1.84
func (networkClient *NetworkClient) Stop() error
type NetworkConnection ¶ added in v1.1.84
func (*NetworkConnection) Close ¶ added in v1.1.84
func (networkConnection *NetworkConnection) Close() error
type NetworkServer ¶ added in v1.1.84
type NetworkServer struct {
// contains filtered or unexported fields
}
func NewNetworkServer ¶ added in v1.1.84
func NewNetworkServer(address string, tlsConfig *tls.Config) (*NetworkServer, error)
func (*NetworkServer) Connect ¶ added in v1.1.84
func (networkServer *NetworkServer) Connect() (*NetworkConnection, error)
func (*NetworkServer) Serve ¶ added in v1.1.84
func (this *NetworkServer) Serve() ([]byte, error)
func (*NetworkServer) Start ¶ added in v1.1.84
func (networkServer *NetworkServer) Start() error
func (*NetworkServer) Stop ¶ added in v1.1.84
func (networkServer *NetworkServer) Stop() error
type Notice ¶ added in v1.1.15
func AppLifecycle ¶ added in v1.1.15
func AppLifecycle() *Notice
func (*Notice) NewChannel ¶ added in v1.1.80
func (this *Notice) NewChannel() chan struct{}
type OrderedMap ¶
type OrderedMap struct {
// contains filtered or unexported fields
}
func NewOrderedMap ¶
func NewOrderedMap(m ...interface{}) *OrderedMap
func (*OrderedMap) Clear ¶
func (o *OrderedMap) Clear() *OrderedMap
func (*OrderedMap) Delete ¶
func (o *OrderedMap) Delete(key interface{}) *OrderedMap
func (*OrderedMap) Get ¶
func (o *OrderedMap) Get(key interface{}) (interface{}, bool)
func (*OrderedMap) Keys ¶
func (o *OrderedMap) Keys() []interface{}
func (*OrderedMap) Len ¶
func (o *OrderedMap) Len() int
func (*OrderedMap) Set ¶
func (o *OrderedMap) Set(key interface{}, value interface{}) *OrderedMap
func (*OrderedMap) SetMap ¶
func (o *OrderedMap) SetMap(m ...interface{}) *OrderedMap
type Quantum ¶
type Quantum struct {
// contains filtered or unexported fields
}
func NewQuantum ¶
func NewQuantum() *Quantum
func ParseQuantum ¶ added in v1.1.27
func (*Quantum) AddQuantum ¶ added in v1.1.27
func (*Quantum) IsIncluded ¶ added in v1.1.15
func (*Quantum) RemoveQuantum ¶ added in v1.1.27
func (*Quantum) RemoveRange ¶
type RandomReader ¶ added in v1.1.21
type RandomReader struct {
// contains filtered or unexported fields
}
func NewRandomReader ¶ added in v1.1.21
func NewRandomReader() *RandomReader
type RuntimeInfo ¶
func GetRuntimeInfo ¶ added in v1.1.15
func GetRuntimeInfo(pos int) RuntimeInfo
func (RuntimeInfo) Filename ¶ added in v1.1.15
func (r RuntimeInfo) Filename() string
func (RuntimeInfo) String ¶ added in v1.1.15
func (r RuntimeInfo) String() string
type SystemInfo ¶ added in v1.1.15
type SystemInfo struct { KernelName string KernelVersion string KernelRelease string Platform string MemTotal string MemFree string }
func GetSystemInfo ¶ added in v1.1.15
func GetSystemInfo() (*SystemInfo, error)
type TTYConnection ¶ added in v1.1.84
type TTYConnection struct {
// contains filtered or unexported fields
}
func (*TTYConnection) Close ¶ added in v1.1.84
func (ttyConnection *TTYConnection) Close() error
type TimeoutReader ¶ added in v1.1.61
type TimeoutWriter ¶ added in v1.1.104
type Webpage ¶ added in v1.1.15
type Webpage struct { HtmlRoot *etree.Element HtmlHead *etree.Element HtmlTitle *etree.Element HtmlMenu *etree.Element HtmlBody *etree.Element HtmlScrollContent *etree.Element HtmlContent *etree.Element // contains filtered or unexported fields }
func NewRefreshPage ¶ added in v1.1.15
type ZeroReader ¶ added in v1.1.21
type ZeroReader struct { }
func NewZeroReader ¶ added in v1.1.21
func NewZeroReader() *ZeroReader
Source Files ¶
- aes.go
- app.go
- common.go
- concurrency.go
- configuration.go
- datetime.go
- deepcopy.go
- discover.go
- echo.go
- endpoint.go
- events.go
- filewalker.go
- i18n.go
- io.go
- jason.go
- keyvalues.go
- knownerrors.go
- logging.go
- mimetype.go
- moduleinfo.go
- network.go
- notice.go
- orderedmap.go
- quantum.go
- reentrant.go
- resource.go
- runtimeinfo.go
- throttledreader.go
- throttledwriter.go
- tls.go
- types.go
- watchdog.go
- webpage.go
- zip.go