Documentation
¶
Index ¶
- func GetBuilding(id uuid.UUID) (*blueprints.Building, error)
- func GetBuildings() map[uuid.UUID]*blueprints.Building
- func GetResource(name string) (*blueprints.Resource, error)
- func GetResources() map[blueprints.ResourceName]*blueprints.Resource
- func ReadYaml[V storeable](path string) error
- type BuildingStore
- type DecoderWithError
- type InvalidFieldError
- type NotFoundError
- type ResourceStore
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
Types ¶
type BuildingStore ¶
type BuildingStore struct {
// contains filtered or unexported fields
}
func (*BuildingStore) Get ¶
func (s *BuildingStore) Get(id uuid.UUID) (*blueprints.Building, error)
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 ¶
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 (s *ResourceStore) Get(name blueprints.ResourceName) (*blueprints.Resource, error)
func (*ResourceStore) Put ¶
func (s *ResourceStore) Put(item *blueprints.Resource)
Click to show internal directories.
Click to hide internal directories.