Documentation
¶
Index ¶
- Variables
- type Builder
- func (b *Builder) Build() (*Model, error)
- func (b *Builder) Description(description string) *Builder
- func (b *Builder) ID(id ID) *Builder
- func (b *Builder) Key(key id.Key) *Builder
- func (b *Builder) Metadata(m *id.SchemaID) *Builder
- func (b *Builder) MustBuild() *Model
- func (b *Builder) Name(name string) *Builder
- func (b *Builder) NewID() *Builder
- func (b *Builder) Order(o int) *Builder
- func (b *Builder) Project(p id.ProjectID) *Builder
- func (b *Builder) Public(public bool) *Builder
- func (b *Builder) RandomKey() *Builder
- func (b *Builder) Schema(s id.SchemaID) *Builder
- func (b *Builder) UpdatedAt(updatedAt time.Time) *Builder
- type ID
- type IDOrKey
- type List
- type Model
- func (p *Model) Clone() *Model
- func (p *Model) CreatedAt() time.Time
- func (p *Model) Description() string
- func (p *Model) ID() ID
- func (p *Model) Key() id.Key
- func (p *Model) Metadata() *SchemaID
- func (p *Model) Name() string
- func (p *Model) Order() int
- func (p *Model) Project() ProjectID
- func (p *Model) Public() bool
- func (p *Model) Schema() SchemaID
- func (p *Model) SetDescription(description string)
- func (p *Model) SetKey(key id.Key) error
- func (p *Model) SetMetadata(id id.SchemaID)
- func (p *Model) SetName(name string)
- func (p *Model) SetOrder(order int)
- func (p *Model) SetPublic(public bool)
- func (p *Model) SetUpdatedAt(updatedAt time.Time)
- func (p *Model) UpdatedAt() time.Time
- type ProjectID
- type SchemaID
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidID = id.ErrInvalidID
View Source
var (
ErrInvalidKey = rerror.NewE(i18n.T("invalid key"))
)
View Source
var IDFrom = id.ModelIDFrom
View Source
var IDFromRef = id.ModelIDFromRef
View Source
var MustID = id.MustModelID
View Source
var NewID = id.NewModelID
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) Description ¶
type List ¶
type List []*Model
func (List) OrderByIDs ¶
func (l List) OrderByIDs(ids id.ModelIDList) List
func (List) Projects ¶
func (l List) Projects() id.ProjectIDList
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (*Model) Description ¶
func (*Model) SetDescription ¶
func (*Model) SetMetadata ¶
func (*Model) SetUpdatedAt ¶
Click to show internal directories.
Click to hide internal directories.