Documentation ¶
Index ¶
- Constants
- Variables
- func ErrDirPkgUnitParseFail(dirpath string, err error) error
- func ErrGetEntity(err error) error
- func ErrImportFailure(hostname string, failedMsg string) error
- func ErrMissingRegistrant(modelName string) error
- func ErrRegisterEntity(err error, name, entity string) error
- func ErrSeedingComponents(err error) error
- func WriteAndReplaceSVGWithFileSystemPath(svgColor, svgWhite, svgComplete string, baseDir, dirname, filename string) (svgColorPath, svgWhitePath, svgCompletePath string)
- type Dir
- type OCIImage
- type RegisterableEntity
- type RegistrationErrorStore
- type RegistrationHelper
- type Tar
Constants ¶
View Source
const ( ErrDirPkgUnitParseFailCode = "replace_me" ErrGetEntityCode = "replace_me" ErrRegisterEntityCode = "replace_me" ErrImportFailureCode = "replace_me" ErrMissingRegistrantCode = "replace_me" ErrSeedingComponentsCode = "replace-me" )
Variables ¶
View Source
var UISVGPaths = make([]string, 1)
Functions ¶
func ErrDirPkgUnitParseFail ¶
func ErrGetEntity ¶
func ErrImportFailure ¶
func ErrMissingRegistrant ¶
func ErrRegisterEntity ¶
func ErrSeedingComponents ¶
func WriteAndReplaceSVGWithFileSystemPath ¶ added in v0.7.55
Types ¶
type Dir ¶
type Dir struct {
// contains filtered or unexported fields
}
func NewDir ¶
The directory should contain one and only one `model`. A directory containing multiple `model` will be invalid.
func (Dir) PkgUnit ¶
func (d Dir) PkgUnit(regErrStore RegistrationErrorStore) (_ packagingUnit, err error)
PkgUnit parses all the files inside the directory and finds out if they are any valid meshery definitions. Valid meshery definitions are added to the packagingUnit struct. Invalid definitions are stored in the regErrStore with error data.
type OCIImage ¶
type OCIImage struct {
// contains filtered or unexported fields
}
func (OCIImage) PkgUnit ¶
func (o OCIImage) PkgUnit(regErrStore RegistrationErrorStore) (packagingUnit, error)
type RegisterableEntity ¶
type RegisterableEntity interface { /* 1. `err` - this is a breaking error, which signifies that the given entity is invalid and cannot be registered 2. Errors encountered while parsing items into meshmodel entites are stored in the RegistrationErrorStore */ PkgUnit(RegistrationErrorStore) (packagingUnit, error) }
Anything that can be parsed into a packagingUnit is a RegisterableEntity in Meshery server
type RegistrationErrorStore ¶
type RegistrationErrorStore interface { AddInvalidDefinition(string, error) InsertEntityRegError(hostname string, modelName string, entityType entity.EntityType, entityName string, err error) }
RegistrationErrorStore stores all the errors that does not break the registration process, but have to be reported nevertheless.
type RegistrationHelper ¶
type RegistrationHelper struct {
// contains filtered or unexported fields
}
func NewRegistrationHelper ¶
func NewRegistrationHelper(svgBaseDir string, regm *meshmodel.RegistryManager, regErrStore RegistrationErrorStore) RegistrationHelper
func (*RegistrationHelper) Register ¶
func (rh *RegistrationHelper) Register(entity RegisterableEntity)
Register will accept a RegisterableEntity (dir, tar or oci for now).
Click to show internal directories.
Click to hide internal directories.