Documentation
¶
Index ¶
- type Handler
- type ListMetadata
- type MemRepo
- func (repo *MemRepo) Create(_ context.Context, item *Resource) error
- func (repo *MemRepo) Delete(_ context.Context, packageName, resourceType, name string) error
- func (repo *MemRepo) Get(_ context.Context, packageName, resourceType, name string) (*Resource, error)
- func (repo *MemRepo) List(_ context.Context, packageName, apiVersion, resourceType string) (ResourceList, error)
- func (repo *MemRepo) Update(_ context.Context, item *Resource) error
- type Metadata
- type Package
- type Resource
- type ResourceExistsError
- type ResourceList
- type ResourceNotFoundError
- type ResourceTypeDefinition
- type ResourceTypeDefinitionNotFoundError
- type ResourceTypeDefinitionVersion
- type ResourcesRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(resourcesRepo ResourcesRepository) *Handler
type ListMetadata ¶
type MemRepo ¶
func NewMemRepo ¶
func NewMemRepo() *MemRepo
type ResourceExistsError ¶
func (ResourceExistsError) Error ¶
func (err ResourceExistsError) Error() string
type ResourceList ¶
type ResourceList struct {
Metadata ListMetadata `json:"metadata"`
Items []*Resource `json:"items"`
}
type ResourceNotFoundError ¶
func (ResourceNotFoundError) Error ¶
func (err ResourceNotFoundError) Error() string
type ResourceTypeDefinition ¶
type ResourceTypeDefinition struct {
Metadata Metadata `json:"metadata"`
Package string `json:"package"`
Versions []ResourceTypeDefinitionVersion `json:"versions"`
ResourceType string `json:"resourceType"`
Plural string `json:"plural"`
}
type ResourceTypeDefinitionNotFoundError ¶
func (ResourceTypeDefinitionNotFoundError) Error ¶
func (err ResourceTypeDefinitionNotFoundError) Error() string
type ResourcesRepository ¶
type ResourcesRepository interface {
List(ctx context.Context, packageName, apiVersion, resourceType string) (list ResourceList, err error)
Create(ctx context.Context, item *Resource) (err error)
Get(ctx context.Context, packageName, resourceType, name string) (item *Resource, err error)
Update(ctx context.Context, item *Resource) (err error)
Delete(ctx context.Context, packageName, resourceTypePlural, name string) (err error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.