Documentation
¶
Index ¶
- type CreateMessage
- type Entity
- type FilesystemLayout
- type IP
- type Image
- type Message
- type Network
- type Partition
- type Project
- type ProjectScope
- type Query
- type Repository
- type Store
- func (r *Store) FilesystemLayout() FilesystemLayout
- func (r *Store) IP(project string) IP
- func (r *Store) Image() Image
- func (r *Store) IpDeleteHandleFn(ctx context.Context, t *asynq.Task) error
- func (r *Store) Network(project string) Network
- func (r *Store) Partition() Partition
- func (r *Store) Project(project string) Project
- func (r *Store) Tenant() Tenant
- func (r *Store) UnscopedIP() IP
- func (r *Store) UnscopedNetwork() Network
- func (r *Store) UnscopedProject() Project
- type Tenant
- type UpdateMessage
- type Validated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateMessage ¶
type CreateMessage any
type FilesystemLayout ¶
type FilesystemLayout interface {
Repository[*metal.FilesystemLayout, *apiv2.FilesystemLayout, *adminv2.FilesystemServiceCreateRequest, *adminv2.FilesystemServiceUpdateRequest, *apiv2.FilesystemServiceListRequest]
}
type IP ¶
type IP interface {
Repository[*metal.IP, *apiv2.IP, *apiv2.IPServiceCreateRequest, *apiv2.IPServiceUpdateRequest, *apiv2.IPQuery]
}
type Network ¶
type Network interface {
Repository[*metal.Network, *apiv2.Network, *apiv2.NetworkServiceCreateRequest, *apiv2.NetworkServiceUpdateRequest, *apiv2.NetworkServiceListRequest]
}
type Partition ¶
type Partition interface {
Repository[*metal.Partition, *apiv2.Partition, *adminv2.PartitionServiceCreateRequest, *adminv2.PartitionServiceUpdateRequest, *apiv2.PartitionQuery]
}
type Project ¶
type Project interface {
Repository[*mdcv1.Project, *apiv2.Project, *apiv2.ProjectServiceCreateRequest, *apiv2.ProjectServiceUpdateRequest, *apiv2.ProjectServiceListRequest]
}
type ProjectScope ¶
type ProjectScope struct {
// contains filtered or unexported fields
}
type Repository ¶
type Repository[E Entity, M Message, C CreateMessage, U UpdateMessage, Q Query] interface {
Get(ctx context.Context, id string) (E, error)
ValidateCreate(ctx context.Context, create C) (*Validated[C], error)
Create(ctx context.Context, c *Validated[C]) (E, error)
ValidateUpdate(ctx context.Context, msg U) (*Validated[U], error)
Update(ctx context.Context, msg *Validated[U]) (E, error)
ValidateDelete(ctx context.Context, e E) (*Validated[E], error)
Delete(ctx context.Context, e *Validated[E]) (E, error)
Find(ctx context.Context, query Q) (E, error)
List(ctx context.Context, query Q) ([]E, error)
ConvertToInternal(msg M) (E, error)
ConvertToProto(e E) (M, error)
MatchScope(e E) error
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) FilesystemLayout ¶
func (r *Store) FilesystemLayout() FilesystemLayout
func (*Store) IpDeleteHandleFn ¶
func (*Store) UnscopedIP ¶
func (r *Store) UnscopedIP() IP
func (*Store) UnscopedNetwork ¶
func (r *Store) UnscopedNetwork() Network
func (*Store) UnscopedProject ¶
func (r *Store) UnscopedProject() Project
type Tenant ¶
type Tenant interface {
Repository[*mdcv1.Tenant, *apiv2.Tenant, *apiv2.TenantServiceCreateRequest, *apiv2.TenantServiceUpdateRequest, *apiv2.TenantServiceListRequest]
}
type UpdateMessage ¶
type UpdateMessage any
Click to show internal directories.
Click to hide internal directories.