common

package
v0.0.0-...-eb79982 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2016 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const ErrorKey string = "error"

Variables

This section is empty.

Functions

func NewError

func NewError(c *gin.Context, operation string, err error)

func NewErrorString

func NewErrorString(c *gin.Context, operation, err string)

Types

type Error

type Error struct {
	Operation   string `json:"operation"`
	ErrorString string `json:"error"`
}

func (*Error) Error

func (e *Error) Error() string

type ModifierFunc

type ModifierFunc func(string) string

func MetaModifier

func MetaModifier() ModifierFunc

func UsernameModifier

func UsernameModifier(username string) ModifierFunc

type Reply

type Reply struct {
	Name string `json:"name"`

	Bucket string `json:"bucket,omitempty"`
	Key    string `json:"key,omitempty"`
	Size   uint64 `json:"size,omitempty"`

	MetaSize   uint64 `json:"meta_size,omitempty"`
	MetaBucket string `json:"meta_bucket,omitempty"`
	MetaKey    string `json:"meta_key,omitempty"`

	ContentType string `json:"content_type,omitempty"`

	Timestamp time.Time   `json:"timestamp,omitempty"`
	Media     nullx.Media `json:"media,omitempty"`
}

Jump to

Keyboard shortcuts

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