Documentation ¶
Index ¶
- Variables
- func ErrUnknownHost(err error) error
- func HostnameToPascalCase(input string) string
- type ArtifactHub
- type Entity
- type Host
- type IHost
- type Kubernetes
- type MeshModelRegistrantData
- type Registry
- type RegistryManager
- func (rm *RegistryManager) Cleanup()
- func (rm *RegistryManager) GetCategories(db *database.Handler, f types.Filter) ([]v1alpha1.Category, int64)
- func (rm *RegistryManager) GetEntities(f types.Filter) ([]Entity, *int64, *int)
- func (rm *RegistryManager) GetModels(db *database.Handler, f types.Filter) ([]v1alpha1.Model, int64, int)
- func (rm *RegistryManager) GetRegistrant(e Entity) Host
- func (rm *RegistryManager) RegisterEntity(h Host, en Entity) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrUnknownHostCode = "11097"
)
Functions ¶
func ErrUnknownHost ¶
func HostnameToPascalCase ¶ added in v0.6.54
Types ¶
type ArtifactHub ¶
type ArtifactHub struct{}
func (ArtifactHub) HandleDependents ¶
func (ah ArtifactHub) HandleDependents(comp v1alpha1.Component, kc *kubernetes.Client, isDeploy bool) (summary string, err error)
func (ArtifactHub) String ¶
func (ah ArtifactHub) String() string
type Entity ¶
type Entity interface { Type() types.CapabilityType GetID() uuid.UUID }
Entity is referred as any type of schema managed by the registry ComponentDefinitions and PolicyDefinitions are examples of entities
type Host ¶
type IHost ¶
type IHost interface { HandleDependents(comp v1alpha1.Component, kc *kubernetes.Client, isDeploy bool) (string, error) String() string }
Each host from where meshmodels can be generated needs to implement this interface HandleDependents, contains host specific logic for provisioning required CRDs/operators for corresponding components.
type Kubernetes ¶
type Kubernetes struct{}
func (Kubernetes) HandleDependents ¶
func (k Kubernetes) HandleDependents(comp v1alpha1.Component, kc *kubernetes.Client, isDeploy bool) (summary string, err error)
func (Kubernetes) String ¶
func (k Kubernetes) String() string
type MeshModelRegistrantData ¶
type MeshModelRegistrantData struct { Host Host `json:"host"` EntityType types.CapabilityType `json:"entityType"` Entity []byte `json:"entity"` //This will be type converted to appropriate entity on server based on passed entity type }
MeshModelRegistrantData struct defines the body of the POST request that is sent to the capability registry (Meshery)
The body contains the 1. Host information 2. Entity type 3. Entity
type RegistryManager ¶
type RegistryManager struct {
// contains filtered or unexported fields
}
RegistryManager instance will expose methods for registry operations & sits between the database level operations and user facing API handlers.
func NewRegistryManager ¶
func NewRegistryManager(db *database.Handler) (*RegistryManager, error)
NewRegistryManager initializes the registry manager by creating appropriate tables. Any new entities that are added to the registry should be migrated here into the database
func (*RegistryManager) Cleanup ¶
func (rm *RegistryManager) Cleanup()
func (*RegistryManager) GetCategories ¶
func (*RegistryManager) GetEntities ¶
func (*RegistryManager) GetRegistrant ¶
func (rm *RegistryManager) GetRegistrant(e Entity) Host
func (*RegistryManager) RegisterEntity ¶
func (rm *RegistryManager) RegisterEntity(h Host, en Entity) error