registry

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBuilding

func GetBuilding(id uuid.UUID) (*blueprints.Building, error)

func GetBuildings

func GetBuildings() map[uuid.UUID]*blueprints.Building

func GetResource

func GetResource(name string) (*blueprints.Resource, error)

func GetResources

func GetResources() map[blueprints.ResourceName]*blueprints.Resource

func ReadYaml

func ReadYaml[V storeable](path string) error

Types

type BuildingStore

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

func (*BuildingStore) Get

func (*BuildingStore) Put

func (s *BuildingStore) Put(item *blueprints.Building)

type DecoderWithError

type DecoderWithError struct {
	*yaml.Decoder

	Err error
}

func NewDecoderWithError

func NewDecoderWithError(r io.Reader) *DecoderWithError

func (*DecoderWithError) Decode

func (dwe *DecoderWithError) Decode(v any) error

type InvalidFieldError

type InvalidFieldError struct {
	Field string
}

func NewInvalidFieldError

func NewInvalidFieldError(field string) InvalidFieldError

func (InvalidFieldError) Error

func (ife InvalidFieldError) Error() string

type NotFoundError

type NotFoundError struct {
	Kind string
	ID   uuid.UUID
}

func NewNotFoundError

func NewNotFoundError(kind string, id uuid.UUID) NotFoundError

func (NotFoundError) Error

func (e NotFoundError) Error() string

type ResourceStore

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

func (*ResourceStore) Get

func (*ResourceStore) Put

func (s *ResourceStore) Put(item *blueprints.Resource)

Jump to

Keyboard shortcuts

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