message

package
v0.0.0-...-2bc4271 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessage

func GetMessage(err IMessage) string

GetMessage returns message

Types

type IMessage

type IMessage interface {
	Code() string
	Type() messagetype.MessageType
	IsError() bool
	IsWarning() bool
	ShortDescription() string
	LongDescription() string
}

IMessage interface

func NewMessage

func NewMessage(code string, messageType messagetype.MessageType, definition string, args ...interface{}) IMessage

NewMessage creates new message

type Message

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

Message type

func (*Message) Code

func (m *Message) Code() string

Code is message code

func (*Message) IsError

func (m *Message) IsError() bool

IsError whether is error or not

func (*Message) IsWarning

func (m *Message) IsWarning() bool

IsWarning whether is warning or not

func (*Message) LongDescription

func (m *Message) LongDescription() string

LongDescription is message long description

func (*Message) ShortDescription

func (m *Message) ShortDescription() string

ShortDescription is message short description

func (*Message) Type

func (m *Message) Type() messagetype.MessageType

Type is message type

Jump to

Keyboard shortcuts

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