status

package
v0.0.0-...-bd18503 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStatus

type IStatus interface {
	SetStatus(code string, msg string) IStatus
	ErrMsg(msg string) IStatus
	OkMsg(msg string) IStatus
	Ok() IStatus
	IsOk() bool
	IsErr() bool
}

func NewStatusErr

func NewStatusErr(err error, ok_msg, err_msg string) IStatus

type Status

type Status struct {
	Code string
	Msg  string
}
var ErrStatus Status = Status{Code: "300", Msg: "Failed"}
var OkStatus Status = Status{Code: "200", Msg: "OK"}

func NewErrStatus

func NewErrStatus(msg string) *Status

func NewStatus

func NewStatus() *Status

func (*Status) ErrMsg

func (p *Status) ErrMsg(msg string) IStatus

func (*Status) IsErr

func (p *Status) IsErr() bool

func (*Status) IsOk

func (p *Status) IsOk() bool

func (*Status) Ok

func (p *Status) Ok() IStatus

func (*Status) OkErrMsg

func (p *Status) OkErrMsg(err error, ok_msg, err_msg string) IStatus

func (*Status) OkMsg

func (p *Status) OkMsg(msg string) IStatus

func (*Status) SetStatus

func (p *Status) SetStatus(code string, msg string) IStatus

Jump to

Keyboard shortcuts

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