model

package
v2.3.38 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Export     = "export"
	Import     = "import"
	MassUpdate = "mass-update"
	MassDelete = "mass-delete"
)

Variables

Functions

This section is empty.

Types

type Error

type Error struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Message

type Message struct {
	Mu      sync.Mutex `json:"-"`
	Count   int        `json:"count"`
	Success []string   `json:"success,omitempty"`
	Errors  []Error    `json:"errors,omitempty"`
	Error   *string    `json:"error,omitempty"`
	Data    []byte     `json:"-"`
}

func NewMessage

func NewMessage() *Message

func (*Message) AddError

func (m *Message) AddError(key string, value string)

func (*Message) AddSuccess

func (m *Message) AddSuccess(idx string)

func (*Message) GetCount

func (m *Message) GetCount() int

func (*Message) GetData

func (m *Message) GetData() []byte

func (*Message) GetError

func (m *Message) GetError() *string

func (*Message) GetErrors

func (m *Message) GetErrors() []Error

func (*Message) GetSuccesses

func (m *Message) GetSuccesses() []string

func (*Message) SetCount

func (m *Message) SetCount(value int)

func (*Message) SetData

func (m *Message) SetData(value []byte)

func (*Message) SetError

func (m *Message) SetError(err string)

Jump to

Keyboard shortcuts

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