uidmixin

package
v0.0.0-...-df46072 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UID

type UID struct {
	mixin.Schema
	// contains filtered or unexported fields
}

UID defines an ent UID that captures the uid prefix for a type.

func NewUID

func NewUID(prefix string) *UID

func (UID) Annotations

func (m UID) Annotations() []schema.Annotation

Annotations returns the annotations for a Mixin instance.

func (UID) Fields

func (m UID) Fields() []ent.Field

Fields provides the id field.

type UIDAnnotation

type UIDAnnotation struct {
	Prefix string
	Length int
}

UIDAnnotation captures the id prefix for a type.

func (UIDAnnotation) Name

func (a UIDAnnotation) Name() string

Name implements the ent Annotation interface.

Jump to

Keyboard shortcuts

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