schema

package
v0.0.0-...-42841ab Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 8 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanNullId

func CleanNullId() string

func CleanUuid

func CleanUuid() (string, error)

func ImplementsIIdentity

func ImplementsIIdentity(id IIdentity) bool

func NewUuid

func NewUuid() (string, error)

func NullId

func NullId() string

Types

type DocFtor

type DocFtor[TModel ISchema] func() *TModel

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

func NewError

func NewError(code string, message string) *Error

type GetDocKeyFunc

type GetDocKeyFunc func() string

type IIdentity

type IIdentity interface {
	Id() string
}

type IModel

type IModel interface {
	ISchema
	GetStatus() int
}

IModel is an Injector that represents the Write-Model Type in a CQRS Context

type IMsg

type IMsg interface {
}

type IPayload

type IPayload interface{}

IPayload is the Injector for Payloads

type ISchema

type ISchema interface {
}

ISchema is an Injector that represents the Read-Model Type in a CQRS Context

type IdList

type IdList struct {
	Ids []string `json:"ids"`
}

type Identity

type Identity struct {
	Prefix string `json:"prefix"`
	Value  string `json:"value"`
}

func IdentityFromPrefixedId

func IdentityFromPrefixedId(prefixedId string) (*Identity, error)

func NewIdentity

func NewIdentity(prefix string) (*Identity, error)

func NewIdentityFrom

func NewIdentityFrom(prefix string, id string) (*Identity, error)

func NilIdentity

func NilIdentity() (*Identity, error)

func (*Identity) Id

func (i *Identity) Id() string

type Meta

type Meta struct {
	ID      *Identity
	TraceId string
	Status  int
}

func NewMeta

func NewMeta(id *Identity, traceId string, status int) *Meta

type MsgType

type MsgType string

type Name

type Name string

Jump to

Keyboard shortcuts

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