subtype

package
v0.2.31 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package subtype contains a Service type that can be used to hold all resources of a certain subtype.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Resource(name string) interface{}
	ReplaceAll(resources map[resource.Name]interface{}) error
	Add(name resource.Name, iface interface{}) error
	Remove(name resource.Name) error
	ReplaceOne(n resource.Name, iface interface{}) error
}

Service defines an service that holds and replaces resources.

func New

func New(r map[resource.Name]interface{}) (Service, error)

New creates a new subtype service, which holds and replaces resources belonging to that subtype.

Jump to

Keyboard shortcuts

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