inventory

package
v0.0.0-...-10f60b2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InventorySpaceUUID = uuid.MustParse(`00000000-0000-0000-0000-000000000000`)

Functions

func NewImageService

func NewImageService(repo ImageRepo, clusterSvc ProvisioningClusterService, client ImageServerClient, opts ...ImageServiceOption) imageService

func NewInstanceService

func NewInstanceService(repo InstanceRepo, clusterSvc ProvisioningClusterService, client InstanceServerClient, opts ...InstanceServiceOption) instanceService

func NewInventoryAggregateService

func NewInventoryAggregateService(repo InventoryAggregateRepo) inventoryAggregateService

func NewNetworkACLService

func NewNetworkACLService(repo NetworkACLRepo, clusterSvc ProvisioningClusterService, client NetworkACLServerClient, opts ...NetworkACLServiceOption) networkACLService

func NewNetworkAddressSetService

func NewNetworkAddressSetService(repo NetworkAddressSetRepo, clusterSvc ProvisioningClusterService, client NetworkAddressSetServerClient, opts ...NetworkAddressSetServiceOption) networkAddressSetService

func NewNetworkForwardService

func NewNetworkForwardService(repo NetworkForwardRepo, clusterSvc ProvisioningClusterService, client NetworkForwardServerClient, parentClient NetworkServerClient, opts ...NetworkForwardServiceOption) networkForwardService

func NewNetworkIntegrationService

func NewNetworkIntegrationService(repo NetworkIntegrationRepo, clusterSvc ProvisioningClusterService, client NetworkIntegrationServerClient, opts ...NetworkIntegrationServiceOption) networkIntegrationService

func NewNetworkLoadBalancerService

func NewNetworkLoadBalancerService(repo NetworkLoadBalancerRepo, clusterSvc ProvisioningClusterService, client NetworkLoadBalancerServerClient, parentClient NetworkServerClient, opts ...NetworkLoadBalancerServiceOption) networkLoadBalancerService

func NewNetworkPeerService

func NewNetworkPeerService(repo NetworkPeerRepo, clusterSvc ProvisioningClusterService, client NetworkPeerServerClient, parentClient NetworkServerClient, opts ...NetworkPeerServiceOption) networkPeerService

func NewNetworkService

func NewNetworkService(repo NetworkRepo, clusterSvc ProvisioningClusterService, client NetworkServerClient, opts ...NetworkServiceOption) networkService

func NewNetworkZoneService

func NewNetworkZoneService(repo NetworkZoneRepo, clusterSvc ProvisioningClusterService, client NetworkZoneServerClient, opts ...NetworkZoneServiceOption) networkZoneService

func NewProfileService

func NewProfileService(repo ProfileRepo, clusterSvc ProvisioningClusterService, client ProfileServerClient, opts ...ProfileServiceOption) profileService

func NewProjectService

func NewProjectService(repo ProjectRepo, clusterSvc ProvisioningClusterService, client ProjectServerClient, opts ...ProjectServiceOption) projectService

func NewStorageBucketService

func NewStorageBucketService(repo StorageBucketRepo, clusterSvc ProvisioningClusterService, client StorageBucketServerClient, parentClient StoragePoolServerClient, opts ...StorageBucketServiceOption) storageBucketService

func NewStoragePoolService

func NewStoragePoolService(repo StoragePoolRepo, clusterSvc ProvisioningClusterService, client StoragePoolServerClient, opts ...StoragePoolServiceOption) storagePoolService

func NewStorageVolumeService

func NewStorageVolumeService(repo StorageVolumeRepo, clusterSvc ProvisioningClusterService, client StorageVolumeServerClient, parentClient StoragePoolServerClient, opts ...StorageVolumeServiceOption) storageVolumeService

Types

type Image

type Image struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	ProjectName string
	Name        string
	Object      incusapi.Image
	LastUpdated time.Time
}

func (*Image) DeriveUUID

func (m *Image) DeriveUUID() *Image

func (Image) Validate

func (m Image) Validate() error

type ImageFilter

type ImageFilter struct {
	Cluster    *string
	Project    *string
	Expression *string
}

func (ImageFilter) AppendToURLValues

func (f ImageFilter) AppendToURLValues(query url.Values) url.Values

func (ImageFilter) String

func (f ImageFilter) String() string

type ImageRepo

type ImageRepo interface {
	GetAllWithFilter(ctx context.Context, filter ImageFilter) (Images, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter ImageFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Image, error)
	Create(ctx context.Context, image Image) (Image, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, image Image) (Image, error)
}

type ImageServerClient

type ImageServerClient interface {
	GetImages(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.Image, error)
	GetImageByName(ctx context.Context, endpoint provisioning.Endpoint, imageName string) (incusapi.Image, error)
}

type ImageService

type ImageService interface {
	GetAllWithFilter(ctx context.Context, filter ImageFilter) (Images, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter ImageFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Image, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type ImageServiceOption

type ImageServiceOption func(s *imageService)

func ImageWithSyncFilter

func ImageWithSyncFilter(clusterSyncFilterFunc func(image Image) bool) ImageServiceOption

type Images

type Images []Image

type Instance

type Instance struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	Server      string
	ProjectName string
	Name        string
	Object      incusapi.InstanceFull
	LastUpdated time.Time
}

func (*Instance) DeriveUUID

func (m *Instance) DeriveUUID() *Instance

func (Instance) Validate

func (m Instance) Validate() error

type InstanceFilter

type InstanceFilter struct {
	Cluster    *string
	Server     *string
	Project    *string
	Expression *string
}

func (InstanceFilter) AppendToURLValues

func (f InstanceFilter) AppendToURLValues(query url.Values) url.Values

func (InstanceFilter) String

func (f InstanceFilter) String() string

type InstanceRepo

type InstanceRepo interface {
	GetAllWithFilter(ctx context.Context, filter InstanceFilter) (Instances, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter InstanceFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Instance, error)
	Create(ctx context.Context, instance Instance) (Instance, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, instance Instance) (Instance, error)
}

type InstanceServerClient

type InstanceServerClient interface {
	GetInstances(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.InstanceFull, error)
	GetInstanceByName(ctx context.Context, endpoint provisioning.Endpoint, instanceName string) (incusapi.InstanceFull, error)
}

type InstanceService

type InstanceService interface {
	GetAllWithFilter(ctx context.Context, filter InstanceFilter) (Instances, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter InstanceFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Instance, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type InstanceServiceOption

type InstanceServiceOption func(s *instanceService)

func InstanceWithSyncFilter

func InstanceWithSyncFilter(clusterSyncFilterFunc func(instance Instance) bool) InstanceServiceOption

type Instances

type Instances []Instance

type InventoryAggregate

type InventoryAggregate struct {
	Cluster              string
	Servers              []string
	Images               Images
	Instances            Instances
	Networks             Networks
	NetworkACLs          NetworkACLs
	NetworkForwards      NetworkForwards
	NetworkIntegrations  NetworkIntegrations
	NetworkLoadBalancers NetworkLoadBalancers
	NetworkPeers         NetworkPeers
	NetworkZones         NetworkZones
	Profiles             Profiles
	Projects             Projects
	StorageBuckets       StorageBuckets
	StoragePools         StoragePools
	StorageVolumes       StorageVolumes
}

type InventoryAggregateFilter

type InventoryAggregateFilter struct {
	Kinds              []string
	Clusters           []string
	Servers            []string
	ServerIncludeNull  bool
	Projects           []string
	ProjectIncludeNull bool
	Parents            []string
	ParentIncludeNull  bool
	Expression         *string
}

func (InventoryAggregateFilter) AppendToURLValues

func (f InventoryAggregateFilter) AppendToURLValues(query url.Values) url.Values

func (InventoryAggregateFilter) String

func (f InventoryAggregateFilter) String() string

type InventoryAggregateRepo

type InventoryAggregateRepo interface {
	GetAllWithFilter(ctx context.Context, filter InventoryAggregateFilter) (InventoryAggregates, error)
}

type InventoryAggregateService

type InventoryAggregateService interface {
	GetAllWithFilter(ctx context.Context, filter InventoryAggregateFilter) (InventoryAggregates, error)
}

type InventoryAggregates

type InventoryAggregates []InventoryAggregate

type Network

type Network struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	ProjectName string
	Name        string
	Object      incusapi.Network
	LastUpdated time.Time
}

func (*Network) DeriveUUID

func (m *Network) DeriveUUID() *Network

func (Network) Validate

func (m Network) Validate() error

type NetworkACL

type NetworkACL struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	ProjectName string
	Name        string
	Object      incusapi.NetworkACL
	LastUpdated time.Time
}

func (*NetworkACL) DeriveUUID

func (m *NetworkACL) DeriveUUID() *NetworkACL

func (NetworkACL) Validate

func (m NetworkACL) Validate() error

type NetworkACLFilter

type NetworkACLFilter struct {
	Cluster    *string
	Project    *string
	Expression *string
}

func (NetworkACLFilter) AppendToURLValues

func (f NetworkACLFilter) AppendToURLValues(query url.Values) url.Values

func (NetworkACLFilter) String

func (f NetworkACLFilter) String() string

type NetworkACLRepo

type NetworkACLRepo interface {
	GetAllWithFilter(ctx context.Context, filter NetworkACLFilter) (NetworkACLs, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkACLFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkACL, error)
	Create(ctx context.Context, networkACL NetworkACL) (NetworkACL, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, networkACL NetworkACL) (NetworkACL, error)
}

type NetworkACLServerClient

type NetworkACLServerClient interface {
	GetNetworkACLs(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.NetworkACL, error)
	GetNetworkACLByName(ctx context.Context, endpoint provisioning.Endpoint, networkACLName string) (incusapi.NetworkACL, error)
}

type NetworkACLService

type NetworkACLService interface {
	GetAllWithFilter(ctx context.Context, filter NetworkACLFilter) (NetworkACLs, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkACLFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkACL, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type NetworkACLServiceOption

type NetworkACLServiceOption func(s *networkACLService)

func NetworkACLWithSyncFilter

func NetworkACLWithSyncFilter(clusterSyncFilterFunc func(networkACL NetworkACL) bool) NetworkACLServiceOption

type NetworkACLs

type NetworkACLs []NetworkACL

type NetworkAddressSet

type NetworkAddressSet struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	ProjectName string
	Name        string
	Object      incusapi.NetworkAddressSet
	LastUpdated time.Time
}

func (*NetworkAddressSet) DeriveUUID

func (m *NetworkAddressSet) DeriveUUID() *NetworkAddressSet

func (NetworkAddressSet) Validate

func (m NetworkAddressSet) Validate() error

type NetworkAddressSetFilter

type NetworkAddressSetFilter struct {
	Cluster    *string
	Project    *string
	Expression *string
}

func (NetworkAddressSetFilter) AppendToURLValues

func (f NetworkAddressSetFilter) AppendToURLValues(query url.Values) url.Values

func (NetworkAddressSetFilter) String

func (f NetworkAddressSetFilter) String() string

type NetworkAddressSetRepo

type NetworkAddressSetRepo interface {
	GetAllWithFilter(ctx context.Context, filter NetworkAddressSetFilter) (NetworkAddressSets, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkAddressSetFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkAddressSet, error)
	Create(ctx context.Context, networkAddressSet NetworkAddressSet) (NetworkAddressSet, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, networkAddressSet NetworkAddressSet) (NetworkAddressSet, error)
}

type NetworkAddressSetServerClient

type NetworkAddressSetServerClient interface {
	HasExtension(ctx context.Context, endpoint provisioning.Endpoint, extension string) (exists bool)
	GetNetworkAddressSets(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.NetworkAddressSet, error)
	GetNetworkAddressSetByName(ctx context.Context, endpoint provisioning.Endpoint, networkAddressSetName string) (incusapi.NetworkAddressSet, error)
}

type NetworkAddressSetService

type NetworkAddressSetService interface {
	GetAllWithFilter(ctx context.Context, filter NetworkAddressSetFilter) (NetworkAddressSets, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkAddressSetFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkAddressSet, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type NetworkAddressSetServiceOption

type NetworkAddressSetServiceOption func(s *networkAddressSetService)

func NetworkAddressSetWithSyncFilter

func NetworkAddressSetWithSyncFilter(clusterSyncFilterFunc func(networkAddressSet NetworkAddressSet) bool) NetworkAddressSetServiceOption

type NetworkAddressSets

type NetworkAddressSets []NetworkAddressSet

type NetworkFilter

type NetworkFilter struct {
	Cluster    *string
	Project    *string
	Expression *string
}

func (NetworkFilter) AppendToURLValues

func (f NetworkFilter) AppendToURLValues(query url.Values) url.Values

func (NetworkFilter) String

func (f NetworkFilter) String() string

type NetworkForward

type NetworkForward struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	NetworkName string
	Name        string
	Object      incusapi.NetworkForward
	LastUpdated time.Time
}

func (*NetworkForward) DeriveUUID

func (m *NetworkForward) DeriveUUID() *NetworkForward

func (NetworkForward) Validate

func (m NetworkForward) Validate() error

type NetworkForwardFilter

type NetworkForwardFilter struct {
	Cluster    *string
	Expression *string
}

func (NetworkForwardFilter) AppendToURLValues

func (f NetworkForwardFilter) AppendToURLValues(query url.Values) url.Values

func (NetworkForwardFilter) String

func (f NetworkForwardFilter) String() string

type NetworkForwardRepo

type NetworkForwardRepo interface {
	GetAllWithFilter(ctx context.Context, filter NetworkForwardFilter) (NetworkForwards, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkForwardFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkForward, error)
	Create(ctx context.Context, networkForward NetworkForward) (NetworkForward, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, networkForward NetworkForward) (NetworkForward, error)
}

type NetworkForwardServerClient

type NetworkForwardServerClient interface {
	GetNetworkForwards(ctx context.Context, endpoint provisioning.Endpoint, networkName string) ([]incusapi.NetworkForward, error)
	GetNetworkForwardByName(ctx context.Context, endpoint provisioning.Endpoint, networkName string, networkForwardName string) (incusapi.NetworkForward, error)
}

type NetworkForwardService

type NetworkForwardService interface {
	GetAllWithFilter(ctx context.Context, filter NetworkForwardFilter) (NetworkForwards, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkForwardFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkForward, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type NetworkForwardServiceOption

type NetworkForwardServiceOption func(s *networkForwardService)

func NetworkForwardWithParentFilter

func NetworkForwardWithParentFilter(f func(incusapi.Network) bool) NetworkForwardServiceOption

func NetworkForwardWithSyncFilter

func NetworkForwardWithSyncFilter(clusterSyncFilterFunc func(networkForward NetworkForward) bool) NetworkForwardServiceOption

type NetworkForwards

type NetworkForwards []NetworkForward

type NetworkIntegration

type NetworkIntegration struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	Name        string
	Object      incusapi.NetworkIntegration
	LastUpdated time.Time
}

func (*NetworkIntegration) DeriveUUID

func (m *NetworkIntegration) DeriveUUID() *NetworkIntegration

func (NetworkIntegration) Validate

func (m NetworkIntegration) Validate() error

type NetworkIntegrationFilter

type NetworkIntegrationFilter struct {
	Cluster    *string
	Expression *string
}

func (NetworkIntegrationFilter) AppendToURLValues

func (f NetworkIntegrationFilter) AppendToURLValues(query url.Values) url.Values

func (NetworkIntegrationFilter) String

func (f NetworkIntegrationFilter) String() string

type NetworkIntegrationRepo

type NetworkIntegrationRepo interface {
	GetAllWithFilter(ctx context.Context, filter NetworkIntegrationFilter) (NetworkIntegrations, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkIntegrationFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkIntegration, error)
	Create(ctx context.Context, networkIntegration NetworkIntegration) (NetworkIntegration, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, networkIntegration NetworkIntegration) (NetworkIntegration, error)
}

type NetworkIntegrationServerClient

type NetworkIntegrationServerClient interface {
	GetNetworkIntegrations(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.NetworkIntegration, error)
	GetNetworkIntegrationByName(ctx context.Context, endpoint provisioning.Endpoint, networkIntegrationName string) (incusapi.NetworkIntegration, error)
}

type NetworkIntegrationService

type NetworkIntegrationService interface {
	GetAllWithFilter(ctx context.Context, filter NetworkIntegrationFilter) (NetworkIntegrations, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkIntegrationFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkIntegration, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type NetworkIntegrationServiceOption

type NetworkIntegrationServiceOption func(s *networkIntegrationService)

func NetworkIntegrationWithSyncFilter

func NetworkIntegrationWithSyncFilter(clusterSyncFilterFunc func(networkIntegration NetworkIntegration) bool) NetworkIntegrationServiceOption

type NetworkIntegrations

type NetworkIntegrations []NetworkIntegration

type NetworkLoadBalancer

type NetworkLoadBalancer struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	NetworkName string
	Name        string
	Object      incusapi.NetworkLoadBalancer
	LastUpdated time.Time
}

func (*NetworkLoadBalancer) DeriveUUID

func (m *NetworkLoadBalancer) DeriveUUID() *NetworkLoadBalancer

func (NetworkLoadBalancer) Validate

func (m NetworkLoadBalancer) Validate() error

type NetworkLoadBalancerFilter

type NetworkLoadBalancerFilter struct {
	Cluster    *string
	Expression *string
}

func (NetworkLoadBalancerFilter) AppendToURLValues

func (f NetworkLoadBalancerFilter) AppendToURLValues(query url.Values) url.Values

func (NetworkLoadBalancerFilter) String

func (f NetworkLoadBalancerFilter) String() string

type NetworkLoadBalancerRepo

type NetworkLoadBalancerRepo interface {
	GetAllWithFilter(ctx context.Context, filter NetworkLoadBalancerFilter) (NetworkLoadBalancers, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkLoadBalancerFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkLoadBalancer, error)
	Create(ctx context.Context, networkLoadBalancer NetworkLoadBalancer) (NetworkLoadBalancer, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, networkLoadBalancer NetworkLoadBalancer) (NetworkLoadBalancer, error)
}

type NetworkLoadBalancerServerClient

type NetworkLoadBalancerServerClient interface {
	GetNetworkLoadBalancers(ctx context.Context, endpoint provisioning.Endpoint, networkName string) ([]incusapi.NetworkLoadBalancer, error)
	GetNetworkLoadBalancerByName(ctx context.Context, endpoint provisioning.Endpoint, networkName string, networkLoadBalancerName string) (incusapi.NetworkLoadBalancer, error)
}

type NetworkLoadBalancerService

type NetworkLoadBalancerService interface {
	GetAllWithFilter(ctx context.Context, filter NetworkLoadBalancerFilter) (NetworkLoadBalancers, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkLoadBalancerFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkLoadBalancer, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type NetworkLoadBalancerServiceOption

type NetworkLoadBalancerServiceOption func(s *networkLoadBalancerService)

func NetworkLoadBalancerWithParentFilter

func NetworkLoadBalancerWithParentFilter(f func(incusapi.Network) bool) NetworkLoadBalancerServiceOption

func NetworkLoadBalancerWithSyncFilter

func NetworkLoadBalancerWithSyncFilter(clusterSyncFilterFunc func(networkLoadBalancer NetworkLoadBalancer) bool) NetworkLoadBalancerServiceOption

type NetworkLoadBalancers

type NetworkLoadBalancers []NetworkLoadBalancer

type NetworkPeer

type NetworkPeer struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	NetworkName string
	Name        string
	Object      incusapi.NetworkPeer
	LastUpdated time.Time
}

func (*NetworkPeer) DeriveUUID

func (m *NetworkPeer) DeriveUUID() *NetworkPeer

func (NetworkPeer) Validate

func (m NetworkPeer) Validate() error

type NetworkPeerFilter

type NetworkPeerFilter struct {
	Cluster    *string
	Expression *string
}

func (NetworkPeerFilter) AppendToURLValues

func (f NetworkPeerFilter) AppendToURLValues(query url.Values) url.Values

func (NetworkPeerFilter) String

func (f NetworkPeerFilter) String() string

type NetworkPeerRepo

type NetworkPeerRepo interface {
	GetAllWithFilter(ctx context.Context, filter NetworkPeerFilter) (NetworkPeers, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkPeerFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkPeer, error)
	Create(ctx context.Context, networkPeer NetworkPeer) (NetworkPeer, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, networkPeer NetworkPeer) (NetworkPeer, error)
}

type NetworkPeerServerClient

type NetworkPeerServerClient interface {
	GetNetworkPeers(ctx context.Context, endpoint provisioning.Endpoint, networkName string) ([]incusapi.NetworkPeer, error)
	GetNetworkPeerByName(ctx context.Context, endpoint provisioning.Endpoint, networkName string, networkPeerName string) (incusapi.NetworkPeer, error)
}

type NetworkPeerService

type NetworkPeerService interface {
	GetAllWithFilter(ctx context.Context, filter NetworkPeerFilter) (NetworkPeers, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkPeerFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkPeer, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type NetworkPeerServiceOption

type NetworkPeerServiceOption func(s *networkPeerService)

func NetworkPeerWithParentFilter

func NetworkPeerWithParentFilter(f func(incusapi.Network) bool) NetworkPeerServiceOption

func NetworkPeerWithSyncFilter

func NetworkPeerWithSyncFilter(clusterSyncFilterFunc func(networkPeer NetworkPeer) bool) NetworkPeerServiceOption

type NetworkPeers

type NetworkPeers []NetworkPeer

type NetworkRepo

type NetworkRepo interface {
	GetAllWithFilter(ctx context.Context, filter NetworkFilter) (Networks, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Network, error)
	Create(ctx context.Context, network Network) (Network, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, network Network) (Network, error)
}

type NetworkServerClient

type NetworkServerClient interface {
	GetNetworks(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.Network, error)
	GetNetworkByName(ctx context.Context, endpoint provisioning.Endpoint, networkName string) (incusapi.Network, error)
}

type NetworkService

type NetworkService interface {
	GetAllWithFilter(ctx context.Context, filter NetworkFilter) (Networks, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Network, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type NetworkServiceOption

type NetworkServiceOption func(s *networkService)

func NetworkWithSyncFilter

func NetworkWithSyncFilter(clusterSyncFilterFunc func(network Network) bool) NetworkServiceOption

type NetworkZone

type NetworkZone struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	ProjectName string
	Name        string
	Object      incusapi.NetworkZone
	LastUpdated time.Time
}

func (*NetworkZone) DeriveUUID

func (m *NetworkZone) DeriveUUID() *NetworkZone

func (NetworkZone) Validate

func (m NetworkZone) Validate() error

type NetworkZoneFilter

type NetworkZoneFilter struct {
	Cluster    *string
	Project    *string
	Expression *string
}

func (NetworkZoneFilter) AppendToURLValues

func (f NetworkZoneFilter) AppendToURLValues(query url.Values) url.Values

func (NetworkZoneFilter) String

func (f NetworkZoneFilter) String() string

type NetworkZoneRepo

type NetworkZoneRepo interface {
	GetAllWithFilter(ctx context.Context, filter NetworkZoneFilter) (NetworkZones, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkZoneFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkZone, error)
	Create(ctx context.Context, networkZone NetworkZone) (NetworkZone, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, networkZone NetworkZone) (NetworkZone, error)
}

type NetworkZoneServerClient

type NetworkZoneServerClient interface {
	GetNetworkZones(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.NetworkZone, error)
	GetNetworkZoneByName(ctx context.Context, endpoint provisioning.Endpoint, networkZoneName string) (incusapi.NetworkZone, error)
}

type NetworkZoneService

type NetworkZoneService interface {
	GetAllWithFilter(ctx context.Context, filter NetworkZoneFilter) (NetworkZones, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter NetworkZoneFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (NetworkZone, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type NetworkZoneServiceOption

type NetworkZoneServiceOption func(s *networkZoneService)

func NetworkZoneWithSyncFilter

func NetworkZoneWithSyncFilter(clusterSyncFilterFunc func(networkZone NetworkZone) bool) NetworkZoneServiceOption

type NetworkZones

type NetworkZones []NetworkZone

type Networks

type Networks []Network

type Profile

type Profile struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	ProjectName string
	Name        string
	Object      incusapi.Profile
	LastUpdated time.Time
}

func (*Profile) DeriveUUID

func (m *Profile) DeriveUUID() *Profile

func (Profile) Validate

func (m Profile) Validate() error

type ProfileFilter

type ProfileFilter struct {
	Cluster    *string
	Project    *string
	Expression *string
}

func (ProfileFilter) AppendToURLValues

func (f ProfileFilter) AppendToURLValues(query url.Values) url.Values

func (ProfileFilter) String

func (f ProfileFilter) String() string

type ProfileRepo

type ProfileRepo interface {
	GetAllWithFilter(ctx context.Context, filter ProfileFilter) (Profiles, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter ProfileFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Profile, error)
	Create(ctx context.Context, profile Profile) (Profile, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, profile Profile) (Profile, error)
}

type ProfileServerClient

type ProfileServerClient interface {
	GetProfiles(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.Profile, error)
	GetProfileByName(ctx context.Context, endpoint provisioning.Endpoint, profileName string) (incusapi.Profile, error)
}

type ProfileService

type ProfileService interface {
	GetAllWithFilter(ctx context.Context, filter ProfileFilter) (Profiles, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter ProfileFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Profile, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type ProfileServiceOption

type ProfileServiceOption func(s *profileService)

func ProfileWithSyncFilter

func ProfileWithSyncFilter(clusterSyncFilterFunc func(profile Profile) bool) ProfileServiceOption

type Profiles

type Profiles []Profile

type Project

type Project struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	Name        string
	Object      incusapi.Project
	LastUpdated time.Time
}

func (*Project) DeriveUUID

func (m *Project) DeriveUUID() *Project

func (Project) Validate

func (m Project) Validate() error

type ProjectFilter

type ProjectFilter struct {
	Cluster    *string
	Expression *string
}

func (ProjectFilter) AppendToURLValues

func (f ProjectFilter) AppendToURLValues(query url.Values) url.Values

func (ProjectFilter) String

func (f ProjectFilter) String() string

type ProjectRepo

type ProjectRepo interface {
	GetAllWithFilter(ctx context.Context, filter ProjectFilter) (Projects, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter ProjectFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Project, error)
	Create(ctx context.Context, project Project) (Project, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, project Project) (Project, error)
}

type ProjectServerClient

type ProjectServerClient interface {
	GetProjects(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.Project, error)
	GetProjectByName(ctx context.Context, endpoint provisioning.Endpoint, projectName string) (incusapi.Project, error)
}

type ProjectService

type ProjectService interface {
	GetAllWithFilter(ctx context.Context, filter ProjectFilter) (Projects, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter ProjectFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (Project, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type ProjectServiceOption

type ProjectServiceOption func(s *projectService)

func ProjectWithSyncFilter

func ProjectWithSyncFilter(clusterSyncFilterFunc func(project Project) bool) ProjectServiceOption

type Projects

type Projects []Project

type ProvisioningClusterService

type ProvisioningClusterService interface {
	GetAll(ctx context.Context) (provisioning.Clusters, error)
	GetEndpoint(ctx context.Context, name string) (provisioning.Endpoint, error)
}

type ProvisioningServerService

type ProvisioningServerService interface {
	GetAllByClusterName(ctx context.Context, name string) (provisioning.Servers, error)
}

type StorageBucket

type StorageBucket struct {
	ID              int
	UUID            uuid.UUID
	Cluster         string
	Server          string
	ProjectName     string
	StoragePoolName string
	Name            string
	Object          incusapi.StorageBucket
	LastUpdated     time.Time
}

func (*StorageBucket) DeriveUUID

func (m *StorageBucket) DeriveUUID() *StorageBucket

func (StorageBucket) Validate

func (m StorageBucket) Validate() error

type StorageBucketFilter

type StorageBucketFilter struct {
	Cluster    *string
	Server     *string
	Project    *string
	Expression *string
}

func (StorageBucketFilter) AppendToURLValues

func (f StorageBucketFilter) AppendToURLValues(query url.Values) url.Values

func (StorageBucketFilter) String

func (f StorageBucketFilter) String() string

type StorageBucketRepo

type StorageBucketRepo interface {
	GetAllWithFilter(ctx context.Context, filter StorageBucketFilter) (StorageBuckets, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter StorageBucketFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (StorageBucket, error)
	Create(ctx context.Context, storageBucket StorageBucket) (StorageBucket, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, storageBucket StorageBucket) (StorageBucket, error)
}

type StorageBucketServerClient

type StorageBucketServerClient interface {
	GetStorageBuckets(ctx context.Context, endpoint provisioning.Endpoint, storagePoolName string) ([]incusapi.StorageBucket, error)
	GetStorageBucketByName(ctx context.Context, endpoint provisioning.Endpoint, storagePoolName string, storageBucketName string) (incusapi.StorageBucket, error)
}

type StorageBucketService

type StorageBucketService interface {
	GetAllWithFilter(ctx context.Context, filter StorageBucketFilter) (StorageBuckets, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter StorageBucketFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (StorageBucket, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type StorageBucketServiceOption

type StorageBucketServiceOption func(s *storageBucketService)

func StorageBucketWithParentFilter

func StorageBucketWithParentFilter(f func(incusapi.StoragePool) bool) StorageBucketServiceOption

func StorageBucketWithSyncFilter

func StorageBucketWithSyncFilter(clusterSyncFilterFunc func(storageBucket StorageBucket) bool) StorageBucketServiceOption

type StorageBuckets

type StorageBuckets []StorageBucket

type StoragePool

type StoragePool struct {
	ID          int
	UUID        uuid.UUID
	Cluster     string
	Name        string
	Object      incusapi.StoragePool
	LastUpdated time.Time
}

func (*StoragePool) DeriveUUID

func (m *StoragePool) DeriveUUID() *StoragePool

func (StoragePool) Validate

func (m StoragePool) Validate() error

type StoragePoolFilter

type StoragePoolFilter struct {
	Cluster    *string
	Expression *string
}

func (StoragePoolFilter) AppendToURLValues

func (f StoragePoolFilter) AppendToURLValues(query url.Values) url.Values

func (StoragePoolFilter) String

func (f StoragePoolFilter) String() string

type StoragePoolRepo

type StoragePoolRepo interface {
	GetAllWithFilter(ctx context.Context, filter StoragePoolFilter) (StoragePools, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter StoragePoolFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (StoragePool, error)
	Create(ctx context.Context, storagePool StoragePool) (StoragePool, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, storagePool StoragePool) (StoragePool, error)
}

type StoragePoolServerClient

type StoragePoolServerClient interface {
	GetStoragePools(ctx context.Context, endpoint provisioning.Endpoint) ([]incusapi.StoragePool, error)
	GetStoragePoolByName(ctx context.Context, endpoint provisioning.Endpoint, storagePoolName string) (incusapi.StoragePool, error)
}

type StoragePoolService

type StoragePoolService interface {
	GetAllWithFilter(ctx context.Context, filter StoragePoolFilter) (StoragePools, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter StoragePoolFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (StoragePool, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type StoragePoolServiceOption

type StoragePoolServiceOption func(s *storagePoolService)

func StoragePoolWithSyncFilter

func StoragePoolWithSyncFilter(clusterSyncFilterFunc func(storagePool StoragePool) bool) StoragePoolServiceOption

type StoragePools

type StoragePools []StoragePool

type StorageVolume

type StorageVolume struct {
	ID              int
	UUID            uuid.UUID
	Cluster         string
	Server          string
	ProjectName     string
	StoragePoolName string
	Name            string
	Type            string
	Object          incusapi.StorageVolume
	LastUpdated     time.Time
}

func (*StorageVolume) DeriveUUID

func (m *StorageVolume) DeriveUUID() *StorageVolume

func (StorageVolume) Validate

func (m StorageVolume) Validate() error

type StorageVolumeFilter

type StorageVolumeFilter struct {
	Cluster    *string
	Server     *string
	Project    *string
	Expression *string
}

func (StorageVolumeFilter) AppendToURLValues

func (f StorageVolumeFilter) AppendToURLValues(query url.Values) url.Values

func (StorageVolumeFilter) String

func (f StorageVolumeFilter) String() string

type StorageVolumeRepo

type StorageVolumeRepo interface {
	GetAllWithFilter(ctx context.Context, filter StorageVolumeFilter) (StorageVolumes, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter StorageVolumeFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (StorageVolume, error)
	Create(ctx context.Context, storageVolume StorageVolume) (StorageVolume, error)
	DeleteByUUID(ctx context.Context, id uuid.UUID) error
	DeleteByClusterName(ctx context.Context, cluster string) error
	UpdateByUUID(ctx context.Context, storageVolume StorageVolume) (StorageVolume, error)
}

type StorageVolumeServerClient

type StorageVolumeServerClient interface {
	GetStorageVolumes(ctx context.Context, endpoint provisioning.Endpoint, storagePoolName string) ([]incusapi.StorageVolume, error)
	GetStorageVolumeByName(ctx context.Context, endpoint provisioning.Endpoint, storagePoolName string, storageVolumeName string, storageVolumeType string) (incusapi.StorageVolume, error)
}

type StorageVolumeService

type StorageVolumeService interface {
	GetAllWithFilter(ctx context.Context, filter StorageVolumeFilter) (StorageVolumes, error)
	GetAllUUIDsWithFilter(ctx context.Context, filter StorageVolumeFilter) ([]uuid.UUID, error)
	GetByUUID(ctx context.Context, id uuid.UUID) (StorageVolume, error)
	ResyncByUUID(ctx context.Context, id uuid.UUID) error
	SyncCluster(ctx context.Context, cluster string) error
}

type StorageVolumeServiceOption

type StorageVolumeServiceOption func(s *storageVolumeService)

func StorageVolumeWithParentFilter

func StorageVolumeWithParentFilter(f func(incusapi.StoragePool) bool) StorageVolumeServiceOption

func StorageVolumeWithSyncFilter

func StorageVolumeWithSyncFilter(clusterSyncFilterFunc func(storageVolume StorageVolume) bool) StorageVolumeServiceOption

type StorageVolumes

type StorageVolumes []StorageVolume

Directories

Path Synopsis
repo
server

Jump to

Keyboard shortcuts

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