utility

package
v0.0.0-...-7b3db8a Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(list interface{}, elem interface{}) bool

func CreateThumbnailImage

func CreateThumbnailImage(width, height int, image []byte) (thumbnail []byte, error error)

func GetBoolEnv

func GetBoolEnv(key string, fallback bool) bool

func GetContextPath

func GetContextPath() string

func GetEnv

func GetEnv(key, fallback string) string

func GetIntEnv

func GetIntEnv(key string, fallback int) int

func RandomString

func RandomString(n int) string

func StringsContains

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

Types

type Error

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

func NewError

func NewError(errorText string, no ErrorCode) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) No

func (e *Error) No() ErrorCode

type ErrorCode

type ErrorCode uint
const (
	Unauthorized                           ErrorCode = iota // Unauthorized
	Forbidden                                               // Forbidden
	InternalServerError                                     // InternalServerError
	BackendStoreServiceErrorNotInitialized                  // BackendStoreServiceErrorNotInitialized
	BackendStoreServiceOperationFailed                      // BackendStoreServiceOperationFailed
)

type Logger

type Logger struct{}
var Log *Logger

func (*Logger) Debug

func (l *Logger) Debug(format string, args ...interface{})

Jump to

Keyboard shortcuts

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