utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrForbidden = errors.New("forbidden")
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrUnauthorized = errors.New("unauthorized")

Functions

func EnsureSysadmin added in v0.2.0

func EnsureSysadmin(mm *pluginapi.Client, userID string) error

func FindDir added in v0.2.0

func FindDir(dir string) (string, bool)

FindDir looks for the given directory in nearby ancestors relative to the current working directory as well as the directory of the executable, falling back to `./` if not found.

func ToJSON

func ToJSON(in interface{}) string

Types

type ByteSize

type ByteSize int64

func ParseByteSize

func ParseByteSize(str string) (ByteSize, error)

func (ByteSize) String

func (size ByteSize) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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