domain

package
v0.0.0-...-165d855 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrId      string = "id"
	ErrDlr     string = "dlr"
	ErrDlrData string = "dlrdata"
)
View Source
const (
	ErrEmpty         string = "empty"
	ErrTooShort      string = "tooshort"
	ErrTooLong       string = "toolong"
	ErrNotValid      string = "notvalid"
	ErrInactive      string = "inactive"
	ErrAlreadyExists string = "alreadyexists"
	ErrNotFound      string = "notfound"
)

Variables

View Source
var MESSAGES []string = []string{}
View Source
var (
	MessageNone string = ""
)

Functions

func GetErrors

func GetErrors() []error

func GetMessages

func GetMessages() []string

Types

type Dlr

type Dlr struct {
	DlrData   string    `json:"dlr_data"`   // DlrData is the data of the dlr.
	DlrType   DlrType   `json:"dlr_type"`   // DlrType is the type of the dlr.
	DlrStatus DlrStatus `json:"dlr_status"` // DlrStatus is the status of the dlr.
	Tags      []string  `json:"tags"`       // Tags is the tags of the dlr.
}

Dlr is a struct that represents the object of a dlr basic values.

func NewDlr

func NewDlr(dlrData string,
	dlrType DlrType,
	dlrStatus DlrStatus,
	tags []string) *Dlr

NewDlr creates a new *Dlr.

func NewEmptyDlr

func NewEmptyDlr() *Dlr

NewEmptyDlr creates a new *Dlr with empty values.

func (*Dlr) Clear

func (s *Dlr) Clear()

Clear clears the Dlr.

func (*Dlr) Clone

func (s *Dlr) Clone() *Dlr

Clone returns a clone of the Dlr.

func (*Dlr) Equals

func (s *Dlr) Equals(other *Dlr) bool

Equals returns true if the Dlr is equal to the other Dlr.

func (*Dlr) IsEmpty

func (s *Dlr) IsEmpty() bool

IsEmpty returns true if the Dlr is empty.

func (*Dlr) IsNotEmpty

func (s *Dlr) IsNotEmpty() bool

IsNotEmpty returns true if the Dlr is not empty.

func (*Dlr) String

func (s *Dlr) String() string

String returns a string representation of the Dlr.

func (*Dlr) Validate

func (s *Dlr) Validate() error

Validate validates the Dlr.

type DlrSortField

type DlrSortField int8

DlrSortField is a type that represents the sort fields of a dlr.

const (
	DlrSortFieldNONE DlrSortField = iota
	DlrSortFieldId
	//DlrSortFieldName
	DlrSortFieldCreatedAt
	DlrSortFieldUpdatedAt
)

type DlrStatus

type DlrStatus int8

DlrStatus is a status that represents the status of a dlr.

const (
	DlrStatusNONE DlrStatus = iota
	DlrStatusACTIVE
	DlrStatusINACTIVE
)

type DlrType

type DlrType int8

DlrType is a type that represents the type of a dlr.

const (
	DlrTypeNONE DlrType = iota
)

Jump to

Keyboard shortcuts

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