service

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceSliceToJSON

func ServiceSliceToJSON(e []Service) json.RawMessage

func ServiceToJSON

func ServiceToJSON(e Service) json.RawMessage

func StatusSliceToJSON

func StatusSliceToJSON(in []Status) json.RawMessage

Types

type Service

type Service struct {
	UUID          uuid.UUID                    `json:"uuid"`
	Version       int64                        `json:"version"`
	Identifier    string                       `json:"identifier"`
	Description   string                       `json:"description"`
	Render        element_render.ElementRender `json:"render"`
	Status        Status                       `json:"status"`
	CreatedAt     time.Time                    `json:"created_at"`
	UpdatedAt     time.Time                    `json:"updated_at"`
	CreatedByUUID uuid.UUID                    `json:"created_by_uuid"`
	UpdatedByUUID uuid.UUID                    `json:"updated_by_uuid"`
}

func NewServiceSliceWithRandomValues

func NewServiceSliceWithRandomValues(n int) []Service

func NewServiceWithRandomValues

func NewServiceWithRandomValues() Service

func ServiceFromJSON

func ServiceFromJSON(data json.RawMessage) Service

func ServiceSliceFromJSON

func ServiceSliceFromJSON(data json.RawMessage) []Service

func (Service) ArrayFieldIdentifierToType

func (e Service) ArrayFieldIdentifierToType() map[string]types.FieldType

func (Service) EntityIdentifier

func (e Service) EntityIdentifier() string

func (Service) FieldIdentfierToTypeMap

func (e Service) FieldIdentfierToTypeMap() map[string]types.FieldType

func (Service) IsDependant

func (e Service) IsDependant() bool

func (Service) String

func (e Service) String() string

func (Service) ToJSON

func (e Service) ToJSON() json.RawMessage

type Status

type Status int64
const (
	STATUS_INVALID Status = iota
	STATUS_ACTIVE
	STATUS_DISABLED
)

func JSONToStatusSlice

func JSONToStatusSlice(in json.RawMessage) []Status

func StatusFromPointerString

func StatusFromPointerString(in *string) Status

func StatusFromString

func StatusFromString(in string) Status

func (Status) String

func (e Status) String() string

func (Status) StringPtr

func (e Status) StringPtr() *string

func (Status) ToInt64

func (e Status) ToInt64() int64

Jump to

Keyboard shortcuts

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