id

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssetIDFrom = idx.From[Asset]
View Source
var AssetIDFromRef = idx.FromRef[Asset]
View Source
var AssetIDListFrom = idx.ListFrom[Asset]
View Source
var AuthRequestIDFrom = idx.From[AuthRequest]
View Source
var AuthRequestIDFromRef = idx.FromRef[AuthRequest]
View Source
var AuthRequestIDListFrom = idx.ListFrom[AuthRequest]
View Source
var ClusterIDFrom = idx.From[Cluster]
View Source
var ClusterIDFromRef = idx.FromRef[Cluster]
View Source
var ClusterIDListFrom = idx.ListFrom[Cluster]
View Source
var DatasetFieldIDFrom = idx.From[DatasetField]
View Source
var DatasetFieldIDFromRef = idx.FromRef[DatasetField]
View Source
var DatasetFieldIDListFrom = idx.ListFrom[DatasetField]
View Source
var DatasetIDFrom = idx.From[Dataset]
View Source
var DatasetIDFromRef = idx.FromRef[Dataset]
View Source
var DatasetIDListFrom = idx.ListFrom[Dataset]
View Source
var DatasetSchemaIDFrom = idx.From[DatasetSchema]
View Source
var DatasetSchemaIDFromRef = idx.FromRef[DatasetSchema]
View Source
var DatasetSchemaIDListFrom = idx.ListFrom[DatasetSchema]
View Source
var ErrInvalidID = idx.ErrInvalidID
View Source
var InfoboxFieldIDFrom = idx.From[InfoboxField]
View Source
var InfoboxFieldIDFromRef = idx.FromRef[InfoboxField]
View Source
var InfoboxFieldIDListFrom = idx.ListFrom[InfoboxField]
View Source
var LayerIDFrom = idx.From[Layer]
View Source
var LayerIDFromRef = idx.FromRef[Layer]
View Source
var LayerIDListFrom = idx.ListFrom[Layer]
View Source
var MustAssetID = idx.Must[Asset]
View Source
var MustAuthRequestID = idx.Must[AuthRequest]
View Source
var MustClusterID = idx.Must[Cluster]
View Source
var MustDatasetFieldID = idx.Must[DatasetField]
View Source
var MustDatasetID = idx.Must[Dataset]
View Source
var MustDatasetSchemaID = idx.Must[DatasetSchema]
View Source
var MustInfoboxFieldID = idx.Must[InfoboxField]
View Source
var MustLayerID = idx.Must[Layer]
View Source
var MustProjectID = idx.Must[Project]
View Source
var MustPropertyID = idx.Must[Property]
View Source
var MustPropertyItemID = idx.Must[PropertyItem]
View Source
var MustSceneID = idx.Must[Scene]
View Source
var MustTagID = idx.Must[Tag]
View Source
var MustTeamID = idx.Must[Team]
View Source
var MustUserID = idx.Must[User]
View Source
var MustWidgetID = idx.Must[Widget]
View Source
var NewAssetID = idx.New[Asset]
View Source
var NewAssetIDSet = idx.NewSet[Asset]
View Source
var NewAuthRequestID = idx.New[AuthRequest]
View Source
var NewAuthRequestIDSet = idx.NewSet[AuthRequest]
View Source
var NewClusterID = idx.New[Cluster]
View Source
var NewClusterIDSet = idx.NewSet[Cluster]
View Source
var NewDatasetFieldID = idx.New[DatasetField]
View Source
var NewDatasetFieldIDSet = idx.NewSet[DatasetField]
View Source
var NewDatasetID = idx.New[Dataset]
View Source
var NewDatasetIDSet = idx.NewSet[Dataset]
View Source
var NewDatasetSchemaID = idx.New[DatasetSchema]
View Source
var NewDatasetSchemaIDSet = idx.NewSet[DatasetSchema]
View Source
var NewInfoboxFieldID = idx.New[InfoboxField]
View Source
var NewInfoboxFieldIDSet = idx.NewSet[InfoboxField]
View Source
var NewLayerID = idx.New[Layer]
View Source
var NewLayerIDSet = idx.NewSet[Layer]
View Source
var NewProjectID = idx.New[Project]
View Source
var NewProjectIDSet = idx.NewSet[Project]
View Source
var NewPropertyID = idx.New[Property]
View Source
var NewPropertyIDSet = idx.NewSet[Property]
View Source
var NewPropertyItemID = idx.New[PropertyItem]
View Source
var NewPropertyItemIDSet = idx.NewSet[PropertyItem]
View Source
var NewSceneID = idx.New[Scene]
View Source
var NewSceneIDSet = idx.NewSet[Scene]
View Source
var NewTagID = idx.New[Tag]
View Source
var NewTagIDSet = idx.NewSet[Tag]
View Source
var NewTeamID = idx.New[Team]
View Source
var NewTeamIDSet = idx.NewSet[Team]
View Source
var NewUserID = idx.New[User]
View Source
var NewUserIDSet = idx.NewSet[User]
View Source
var NewWidgetID = idx.New[Widget]
View Source
var NewWidgetIDSet = idx.NewSet[Widget]
View Source
var (
	OfficialPluginID = PluginID{/* contains filtered or unexported fields */}
)
View Source
var PluginExtensionIDFromRef = idx.StringIDFromRef[PluginExtension]
View Source
var ProjectIDFrom = idx.From[Project]
View Source
var ProjectIDFromRef = idx.FromRef[Project]
View Source
var ProjectIDListFrom = idx.ListFrom[Project]
View Source
var PropertyFieldIDFromRef = idx.StringIDFromRef[PropertyField]
View Source
var PropertyIDFrom = idx.From[Property]
View Source
var PropertyIDFromRef = idx.FromRef[Property]
View Source
var PropertyIDListFrom = idx.ListFrom[Property]
View Source
var PropertyItemIDFrom = idx.From[PropertyItem]
View Source
var PropertyItemIDFromRef = idx.FromRef[PropertyItem]
View Source
var PropertyItemIDListFrom = idx.ListFrom[PropertyItem]
View Source
var PropertySchemaGroupIDFromRef = idx.StringIDFromRef[PropertySchemaGroup]
View Source
var SceneIDFrom = idx.From[Scene]
View Source
var SceneIDFromRef = idx.FromRef[Scene]
View Source
var SceneIDListFrom = idx.ListFrom[Scene]
View Source
var TagIDFrom = idx.From[Tag]
View Source
var TagIDFromRef = idx.FromRef[Tag]
View Source
var TagIDListFrom = idx.ListFrom[Tag]
View Source
var TeamIDFrom = idx.From[Team]
View Source
var TeamIDFromRef = idx.FromRef[Team]
View Source
var TeamIDListFrom = idx.ListFrom[Team]
View Source
var UserIDFrom = idx.From[User]
View Source
var UserIDFromRef = idx.FromRef[User]
View Source
var UserIDListFrom = idx.ListFrom[User]
View Source
var WidgetIDFrom = idx.From[Widget]
View Source
var WidgetIDFromRef = idx.FromRef[Widget]
View Source
var WidgetIDListFrom = idx.ListFrom[Widget]

Functions

func PluginIDsToStrings added in v0.4.0

func PluginIDsToStrings(ids []PluginID) []string

PluginIDToKeys converts IDs into a string slice.

func PropertySchemaIDsToStrings added in v0.4.0

func PropertySchemaIDsToStrings(ids []PropertySchemaID) []string

PropertySchemaIDToKeys converts IDs into a string slice.

Types

type Asset added in v0.6.1

type Asset struct{}

func (Asset) Type added in v0.6.1

func (Asset) Type() string

type AssetID

type AssetID = idx.ID[Asset]

type AssetIDList added in v0.6.1

type AssetIDList = idx.List[Asset]

type AssetIDSet

type AssetIDSet = idx.Set[Asset]

type AuthRequest added in v0.6.1

type AuthRequest struct{}

func (AuthRequest) Type added in v0.6.1

func (AuthRequest) Type() string

type AuthRequestID added in v0.6.0

type AuthRequestID = idx.ID[AuthRequest]

type AuthRequestIDList added in v0.6.1

type AuthRequestIDList = idx.List[AuthRequest]

type AuthRequestIDSet added in v0.6.0

type AuthRequestIDSet = idx.Set[AuthRequest]

type Cluster added in v0.6.1

type Cluster struct{}

func (Cluster) Type added in v0.6.1

func (Cluster) Type() string

type ClusterID added in v0.3.0

type ClusterID = idx.ID[Cluster]

type ClusterIDList added in v0.6.1

type ClusterIDList = idx.List[Cluster]

type ClusterIDSet added in v0.3.0

type ClusterIDSet = idx.Set[Cluster]

type Dataset added in v0.6.1

type Dataset struct{}

func (Dataset) Type added in v0.6.1

func (Dataset) Type() string

type DatasetField added in v0.6.1

type DatasetField struct{}

func (DatasetField) Type added in v0.6.1

func (DatasetField) Type() string

type DatasetFieldID added in v0.6.1

type DatasetFieldID = idx.ID[DatasetField]

type DatasetFieldIDList added in v0.6.1

type DatasetFieldIDList = idx.List[DatasetField]

type DatasetFieldIDSet added in v0.6.1

type DatasetFieldIDSet = idx.Set[DatasetField]

type DatasetID

type DatasetID = idx.ID[Dataset]

type DatasetIDList added in v0.6.1

type DatasetIDList = idx.List[Dataset]

type DatasetIDSet

type DatasetIDSet = idx.Set[Dataset]

type DatasetSchema added in v0.6.1

type DatasetSchema struct{}

func (DatasetSchema) Type added in v0.6.1

func (DatasetSchema) Type() string

type DatasetSchemaID

type DatasetSchemaID = idx.ID[DatasetSchema]

type DatasetSchemaIDList added in v0.6.1

type DatasetSchemaIDList = idx.List[DatasetSchema]

type DatasetSchemaIDSet

type DatasetSchemaIDSet = idx.Set[DatasetSchema]

type InfoboxField added in v0.6.1

type InfoboxField struct{}

func (InfoboxField) Type added in v0.6.1

func (InfoboxField) Type() string

type InfoboxFieldID

type InfoboxFieldID = idx.ID[InfoboxField]

type InfoboxFieldIDList added in v0.6.1

type InfoboxFieldIDList = idx.List[InfoboxField]

type InfoboxFieldIDSet

type InfoboxFieldIDSet = idx.Set[InfoboxField]

type Layer added in v0.6.1

type Layer struct{}

func (Layer) Type added in v0.6.1

func (Layer) Type() string

type LayerID

type LayerID = idx.ID[Layer]

type LayerIDList added in v0.6.1

type LayerIDList = idx.List[Layer]

type LayerIDSet

type LayerIDSet = idx.Set[Layer]

type PluginExtension added in v0.6.1

type PluginExtension struct{}

func (PluginExtension) Type added in v0.6.1

func (PluginExtension) Type() string

type PluginExtensionID

type PluginExtensionID = idx.StringID[PluginExtension]

type PluginID

type PluginID struct {
	// contains filtered or unexported fields
}

func MustPluginID

func MustPluginID(id string) PluginID

MustPluginID generates a new id.PluginID from a string, but panics if the string cannot be parsed.

func NewPluginID

func NewPluginID(name string, version string, scene *SceneID) (PluginID, error)

func PluginIDFrom

func PluginIDFrom(id string) (PluginID, error)

PluginIDFrom generates a new id.PluginID from a string.

func PluginIDFromRef

func PluginIDFromRef(id *string) *PluginID

PluginIDFromRef generates a new id.PluginID from a string ref.

func PluginIDsFrom

func PluginIDsFrom(ids []string) ([]PluginID, error)

PluginIDsFrom converts a string slice into a ID slice.

func (PluginID) Clone added in v0.4.0

func (d PluginID) Clone() PluginID

Clone duplicates the PluginID

func (*PluginID) CopyRef

func (d *PluginID) CopyRef() *PluginID

func (PluginID) Equal

func (d PluginID) Equal(d2 PluginID) bool

Equal returns true if two IDs are equal.

func (PluginID) IsNil added in v0.4.0

func (d PluginID) IsNil() bool

IsNil checks if ID is empty or not.

func (*PluginID) MarshalText

func (d *PluginID) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler interface

func (PluginID) Name

func (d PluginID) Name() string

Name returns a name.

func (PluginID) Ref

func (d PluginID) Ref() *PluginID

Ref returns a reference.

func (PluginID) Scene

func (d PluginID) Scene() *SceneID

Scene returns a scene ID of the plugin. It indicates this plugin is private and available for only the specific scene.

func (PluginID) String

func (d PluginID) String() (s string)

String returns a string representation.

func (*PluginID) StringRef

func (d *PluginID) StringRef() *string

StringRef returns a reference of a string representation.

func (PluginID) System

func (d PluginID) System() bool

System returns if the ID is built-in.

func (*PluginID) UnmarshalText

func (d *PluginID) UnmarshalText(text []byte) (err error)

UnmarshalText implements encoding.TextUnmarshaler interface

func (PluginID) Validate

func (d PluginID) Validate() bool

Validate returns true if id is valid.

func (PluginID) Version

func (d PluginID) Version() semver.Version

Version returns a version.

func (PluginID) WithScene added in v0.5.0

func (d PluginID) WithScene(sid *SceneID) PluginID

type Project added in v0.6.1

type Project struct{}

func (Project) Type added in v0.6.1

func (Project) Type() string

type ProjectID

type ProjectID = idx.ID[Project]

type ProjectIDList added in v0.6.1

type ProjectIDList = idx.List[Project]

type ProjectIDSet

type ProjectIDSet = idx.Set[Project]

type Property added in v0.6.1

type Property struct{}

func (Property) Type added in v0.6.1

func (Property) Type() string

type PropertyField added in v0.6.1

type PropertyField struct{}

func (PropertyField) Type added in v0.6.1

func (PropertyField) Type() string

type PropertyFieldID added in v0.6.1

type PropertyFieldID = idx.StringID[PropertyField]

type PropertyID

type PropertyID = idx.ID[Property]

type PropertyIDList added in v0.6.1

type PropertyIDList = idx.List[Property]

type PropertyIDSet

type PropertyIDSet = idx.Set[Property]

type PropertyItem added in v0.6.1

type PropertyItem struct{}

func (PropertyItem) Type added in v0.6.1

func (PropertyItem) Type() string

type PropertyItemID

type PropertyItemID = idx.ID[PropertyItem]

type PropertyItemIDList added in v0.6.1

type PropertyItemIDList = idx.List[PropertyItem]

type PropertyItemIDSet

type PropertyItemIDSet = idx.Set[PropertyItem]

type PropertySchemaGroup added in v0.6.1

type PropertySchemaGroup struct{}

func (PropertySchemaGroup) Type added in v0.6.1

func (PropertySchemaGroup) Type() string

type PropertySchemaGroupID added in v0.2.0

type PropertySchemaGroupID = idx.StringID[PropertySchemaGroup]

type PropertySchemaID

type PropertySchemaID struct {
	// contains filtered or unexported fields
}

func MustPropertySchemaID

func MustPropertySchemaID(id string) PropertySchemaID

MustPropertySchemaID generates a new PropertySchemaID from a string, but panics if the string cannot be parsed.

func NewPropertySchemaID added in v0.5.0

func NewPropertySchemaID(p PluginID, name string) PropertySchemaID

NewPropertySchemaID generates a new PropertySchemaID from a plugin ID and name.

func PropertySchemaIDFrom

func PropertySchemaIDFrom(id string) (PropertySchemaID, error)

PropertySchemaIDFrom generates a new PropertySchemaID from a string.

func PropertySchemaIDFromRef

func PropertySchemaIDFromRef(id *string) *PropertySchemaID

PropertySchemaIDFromRef generates a new PropertySchemaID from a string ref.

func PropertySchemaIDsFrom

func PropertySchemaIDsFrom(ids []string) ([]PropertySchemaID, error)

PropertySchemaIDsFrom converts a string slice into a ID slice.

func (PropertySchemaID) Clone added in v0.4.0

Clone duplicates the PropertySchemaID

func (*PropertySchemaID) CopyRef

func (d *PropertySchemaID) CopyRef() *PropertySchemaID

CopyRef returns a copy of a reference.

func (PropertySchemaID) Equal

Equal returns true if two IDs are equal.

func (PropertySchemaID) ID

func (d PropertySchemaID) ID() string

ID returns a fragment of just ID.

func (PropertySchemaID) IsNil

func (d PropertySchemaID) IsNil() bool

IsNil checks if ID is empty or not.

func (*PropertySchemaID) MarshalText

func (d *PropertySchemaID) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler interface

func (PropertySchemaID) Plugin

func (d PropertySchemaID) Plugin() PluginID

Plugin returns a fragment of plugin ID.

func (PropertySchemaID) Ref

Ref returns a reference.

func (PropertySchemaID) String

func (d PropertySchemaID) String() string

String returns a string representation.

func (*PropertySchemaID) StringRef

func (d *PropertySchemaID) StringRef() *string

StringRef returns a reference of a string representation.

func (*PropertySchemaID) UnmarshalText

func (d *PropertySchemaID) UnmarshalText(text []byte) (err error)

UnmarshalText implements encoding.TextUnmarshaler interface

func (PropertySchemaID) WithPlugin added in v0.5.0

func (d PropertySchemaID) WithPlugin(plugin PluginID) PropertySchemaID

WithPlugin duplicates the PropertySchemaID but its plugin ID is changed

type Scene added in v0.6.1

type Scene struct{}

func (Scene) Type added in v0.6.1

func (Scene) Type() string

type SceneID

type SceneID = idx.ID[Scene]

type SceneIDList added in v0.6.1

type SceneIDList = idx.List[Scene]

type SceneIDSet

type SceneIDSet = idx.Set[Scene]

type Tag added in v0.6.1

type Tag struct{}

func (Tag) Type added in v0.6.1

func (Tag) Type() string

type TagID

type TagID = idx.ID[Tag]

type TagIDList added in v0.6.1

type TagIDList = idx.List[Tag]

type TagIDSet

type TagIDSet = idx.Set[Tag]

type Team added in v0.6.1

type Team struct{}

func (Team) Type added in v0.6.1

func (Team) Type() string

type TeamID

type TeamID = idx.ID[Team]

type TeamIDList added in v0.6.1

type TeamIDList = idx.List[Team]

type TeamIDSet

type TeamIDSet = idx.Set[Team]

type User added in v0.6.1

type User struct{}

func (User) Type added in v0.6.1

func (User) Type() string

type UserID

type UserID = idx.ID[User]

type UserIDList added in v0.6.1

type UserIDList = idx.List[User]

type UserIDSet

type UserIDSet = idx.Set[User]

type Widget added in v0.6.1

type Widget struct{}

func (Widget) Type added in v0.6.1

func (Widget) Type() string

type WidgetID

type WidgetID = idx.ID[Widget]

type WidgetIDList added in v0.6.1

type WidgetIDList = idx.List[Widget]

type WidgetIDSet

type WidgetIDSet = idx.Set[Widget]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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