Documentation
¶
Overview ¶
Package schematic implements schematic factory: storing image schematics.
Index ¶
- type Factory
- func (s *Factory) Collect(ch chan<- prometheus.Metric)
- func (s *Factory) Describe(ch chan<- *prometheus.Desc)
- func (s *Factory) Get(ctx context.Context, id string, auth OwnershipChecker) (*schematic.Schematic, error)
- func (s *Factory) GetRaw(ctx context.Context, id string) (*schematic.Schematic, error)
- func (s *Factory) Put(ctx context.Context, cfg *schematic.Schematic) (string, error)
- type Options
- type OwnershipChecker
- type Repository
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory is the schematic factory.
func NewFactory ¶
NewFactory creates a new schematic factory.
func (*Factory) Collect ¶
func (s *Factory) Collect(ch chan<- prometheus.Metric)
Collect implements prom.Collector interface.
func (*Factory) Describe ¶
func (s *Factory) Describe(ch chan<- *prometheus.Desc)
Describe implements prom.Collector interface.
func (*Factory) Get ¶
func (s *Factory) Get(ctx context.Context, id string, auth OwnershipChecker) (*schematic.Schematic, error)
Get retrieves the stored schematic through the application ownership policy.
Application callers should prefer Service.Get. This compatibility facade adapts legacy authentication-provider contexts into a typed principal before delegating to Service.
type OwnershipChecker ¶ added in v1.2.0
OwnershipChecker resolves the authenticated user from a context.
type Repository ¶ added in v1.7.2
type Repository interface {
Put(ctx context.Context, configuration *schematicpkg.Schematic) (string, error)
GetRaw(ctx context.Context, id string) (*schematicpkg.Schematic, error)
}
Repository stores and retrieves raw schematics.
type Service ¶ added in v1.7.2
type Service struct {
// contains filtered or unexported fields
}
Service owns schematic validation, ownership, and persistence orchestration.
func NewService ¶ added in v1.7.2
func NewService(repository Repository, authEnabled, enterpriseEnabled bool) *Service
NewService creates a schematic application service.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package storage implements a storage for schematic data.
|
Package storage implements a storage for schematic data. |
|
cache
Package cache implements an in-memory cache over schematic storage.
|
Package cache implements an in-memory cache over schematic storage. |
|
registry
Package registry implements a schematic storage in OCI registry.
|
Package registry implements a schematic storage in OCI registry. |