utils

package
v0.0.0-...-585669d Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken() string

func GetConfigRootDir

func GetConfigRootDir() string

GetConfigRootDir will return the dir from the provided/loaded configuration

func ListContainsString

func ListContainsString(s []string, e string) bool

Types

type DismissiveList

type DismissiveList interface {
	Add(value string, ttl int64) error
	Set(value string, ttl int64) error
	Has(value string) bool
	Del(value string) error
	All() ([]string, error)
	Drp() error
}

func NewDismissiveList

func NewDismissiveList(name string) DismissiveList

NewDismissiveList will create a new named list

type InMemoryFile

type InMemoryFile struct {
	fs.File
	InMemoryFileInfo InMemoryFileInfo // Size() will return an inaccurate value, since we modified it
	Buf              *bytes.Buffer
}

func (InMemoryFile) Close

func (im InMemoryFile) Close() error

func (InMemoryFile) Read

func (im InMemoryFile) Read(b []byte) (int, error)

func (InMemoryFile) Stat

func (im InMemoryFile) Stat() (fs.FileInfo, error)

type InMemoryFileInfo

type InMemoryFileInfo struct {
	fs.FileInfo
	FileInfoRef fs.FileInfo
	FileSize    int64
}

func (InMemoryFileInfo) IsDir

func (fi InMemoryFileInfo) IsDir() bool

func (InMemoryFileInfo) ModTime

func (fi InMemoryFileInfo) ModTime() time.Time

func (InMemoryFileInfo) Mode

func (fi InMemoryFileInfo) Mode() fs.FileMode

func (InMemoryFileInfo) Name

func (fi InMemoryFileInfo) Name() string

func (InMemoryFileInfo) Size

func (fi InMemoryFileInfo) Size() int64

Jump to

Keyboard shortcuts

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