models

package
v0.0.0-...-f5bbbf4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Key          string    `pg:",pk"`
	RegistryName string    `pg:"on_delete:CASCADE"`
	Registry     *Registry `pg:"rel:has-one"`
	Value        AliasValue
	CreatedAt    time.Time `pg:"default:now()"`
	UpdatedAt    time.Time `pg:"default:now()"`
	// contains filtered or unexported fields
}

func NewAlias

func NewAlias(alias *entities.Alias) *Alias

func (*Alias) ToEntity

func (a *Alias) ToEntity() *entities.Alias

type AliasValue

type AliasValue struct {
	Kind  string
	Value interface{}
}

type Registry

type Registry struct {
	Name           string    `pg:",pk"`
	Aliases        []Alias   `pg:"rel:has-many"`
	AllowedTenants []string  `pg:",array"`
	CreatedAt      time.Time `pg:"default:now()"`
	UpdatedAt      time.Time `pg:"default:now()"`
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(registry *entities.AliasRegistry) *Registry

func (*Registry) ToEntity

func (r *Registry) ToEntity() *entities.AliasRegistry

Jump to

Keyboard shortcuts

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