common

package
v1.0.22 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvalidRequest added in v0.0.1

func InvalidRequest(msg string) error

InvalidRequest - create error messages that are needed when validating request input

func Now

func Now() int64

Now - current datetime

func Within added in v1.0.3

func Within(ts int64, seconds int64) bool

Within ensures a given timestamp is within certain number of seconds

Types

type Error added in v0.0.1

type Error struct {
	Code string `json:"code,omitempty"`
	Msg  string `json:"msg"`
}

Error type for a new application error

func NewError added in v0.0.1

func NewError(code string, msg string) *Error

NewError - create a new error

func (*Error) Error added in v0.0.1

func (err *Error) Error() string

Directories

Path Synopsis
errors module

Jump to

Keyboard shortcuts

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