registry

package
v0.0.0-...-8a41a53 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownHostCode                 = "replace_me"
	ErrEmptySchemaCode                 = "replace_me"
	ErrMarshalingRegisteryAttemptsCode = "replace_me"
	ErrWritingRegisteryAttemptsCode    = "replace_me"
	ErrRegisteringEntityCode           = "replace_me"
	ErrUnknownHostInMapCode            = "replace_me"
	ErrCreatingUserDataDirectoryCode   = "replace_me"
	ErrGetByIdCode                     = "replace_me"
)

Functions

func ErrCreatingUserDataDirectory

func ErrCreatingUserDataDirectory(dir string) error

func ErrEmptySchema

func ErrEmptySchema() error

func ErrGetById

func ErrGetById(err error, id string) error

func ErrMarshalingRegisteryAttempts

func ErrMarshalingRegisteryAttempts(err error) error

func ErrRegisteringEntity

func ErrRegisteringEntity(failedMsg string, hostName string) error

func ErrUnknownHost

func ErrUnknownHost(err error) error

func ErrUnknownHostInMap

func ErrUnknownHostInMap() error

func ErrWritingRegisteryAttempts

func ErrWritingRegisteryAttempts(err error) error

func HostnameToPascalCase

func HostnameToPascalCase(input string) string

Types

type MeshModelRegistrantData

type MeshModelRegistrantData struct {
	Connection connection.Connection `json:"connection"`
	EntityType entity.EntityType     `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 (Meshplay)

The body contains the 1. Host information 2. Entity type 3. Entity

type Registry

type Registry struct {
	ID           uuid.UUID
	RegistrantID uuid.UUID
	Entity       uuid.UUID
	Type         entity.EntityType
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

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) GetEntities

func (rm *RegistryManager) GetEntities(f entity.Filter) ([]entity.Entity, int64, int, error)

func (*RegistryManager) GetRegistrant

func (rm *RegistryManager) GetRegistrant(e entity.Entity) connection.Connection

func (*RegistryManager) GetRegistrants

to be removed

func (*RegistryManager) RegisterEntity

func (rm *RegistryManager) RegisterEntity(h connection.Connection, en entity.Entity) (bool, bool, error)

func (*RegistryManager) UpdateEntityStatus

func (rm *RegistryManager) UpdateEntityStatus(ID string, status string, entityType string) error

UpdateEntityStatus updates the ignore status of an entity based on the provided parameters. By default during models generation ignore is set to false

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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