commands

package
v1.5.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkValidateVinCommand added in v0.8.3

type BulkValidateVinCommand struct {
	VINs []string `json:"vins"`
}

func (*BulkValidateVinCommand) Key added in v0.8.3

type BulkValidateVinCommandHandler added in v0.8.3

type BulkValidateVinCommandHandler struct {
	DBS                         func() *db.ReaderWriter
	DecodeVINHandler            queries.DecodeVINQueryHandler
	DeviceDefinitionDataHandler queries.GetDeviceDefinitionByIDQueryHandler
}

func NewBulkValidateVinCommandHandler added in v0.8.3

func NewBulkValidateVinCommandHandler(dbs func() *db.ReaderWriter, decodeVINHandler queries.DecodeVINQueryHandler, deviceDefintionDataHandler queries.GetDeviceDefinitionByIDQueryHandler) BulkValidateVinCommandHandler

func (BulkValidateVinCommandHandler) Handle added in v0.8.3

func (dc BulkValidateVinCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error)

type BulkValidateVinCommandResult added in v0.8.3

type BulkValidateVinCommandResult struct {
	DecodedVINs    []DecodedVIN `json:"decoded_vins"`
	NotDecodedVins []string     `json:"not_decoded_vins"`
}

type CreateDeviceDefinitionCommand

type CreateDeviceDefinitionCommand struct {
	Source             string `json:"source"`
	Make               string `json:"make"`
	Model              string `json:"model"`
	Year               int    `json:"year"`
	HardwareTemplateID string `json:"hardware_template_id,omitempty"`
	// DeviceTypeID comes from the device_types.id table, determines what kind of device this is, typically a vehicle
	DeviceTypeID string `json:"device_type_id"`
	// DeviceAttributes sets definition metadata eg. vehicle info. Allowed key/values are defined in device_types.properties
	DeviceAttributes []*coremodels.UpdateDeviceTypeAttribute `json:"deviceAttributes"`
	Verified         bool                                    `json:"verified"`
}

func (*CreateDeviceDefinitionCommand) Key

type CreateDeviceDefinitionCommandHandler

type CreateDeviceDefinitionCommandHandler struct {
	// contains filtered or unexported fields
}

func NewCreateDeviceDefinitionCommandHandler

func NewCreateDeviceDefinitionCommandHandler(onChainSvc gateways.DeviceDefinitionOnChainService, dbs func() *db.ReaderWriter,
	powerTrainTypeService services.PowerTrainTypeService, fuelAPI gateways.FuelAPIService, logger *zerolog.Logger, identity gateways.IdentityAPI) CreateDeviceDefinitionCommandHandler

func (CreateDeviceDefinitionCommandHandler) Handle

func (ch CreateDeviceDefinitionCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error)

type CreateDeviceDefinitionCommandResult

type CreateDeviceDefinitionCommandResult struct {
	ID            string  `json:"id"`
	NameSlug      string  `json:"name_slug"`
	TransactionID *string `json:"transaction_id"`
}

type CreateDeviceStyleCommand added in v0.1.11

type CreateDeviceStyleCommand struct {
	DefinitionID       string `json:"definition_id"`
	Name               string `json:"name"`
	ExternalStyleID    string `json:"external_style_id"`
	Source             string `json:"source"`
	SubModel           string `json:"sub_model"`
	HardwareTemplateID string `json:"hardware_template_id"`
}

func (*CreateDeviceStyleCommand) Key added in v0.1.11

type CreateDeviceStyleCommandHandler added in v0.1.11

type CreateDeviceStyleCommandHandler struct {
	// contains filtered or unexported fields
}

func NewCreateDeviceStyleCommandHandler added in v0.1.11

func NewCreateDeviceStyleCommandHandler(repository repositories.DeviceStyleRepository) CreateDeviceStyleCommandHandler

func (CreateDeviceStyleCommandHandler) Handle added in v0.1.11

func (ch CreateDeviceStyleCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error)

type CreateDeviceStyleCommandResult added in v0.1.11

type CreateDeviceStyleCommandResult struct {
	ID string `json:"id"`
}

type CreateDeviceTypeCommand added in v0.2.3

type CreateDeviceTypeCommand struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func (*CreateDeviceTypeCommand) Key added in v0.2.3

type CreateDeviceTypeCommandHandler added in v0.2.3

type CreateDeviceTypeCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewCreateDeviceTypeCommandHandler added in v0.2.3

func NewCreateDeviceTypeCommandHandler(dbs func() *db.ReaderWriter) CreateDeviceTypeCommandHandler

func (CreateDeviceTypeCommandHandler) Handle added in v0.2.3

func (ch CreateDeviceTypeCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error)

type CreateDeviceTypeCommandResult added in v0.2.3

type CreateDeviceTypeCommandResult struct {
	ID string `json:"id"`
}

type DecodedVIN added in v0.8.3

type DecodedVIN struct {
	VIN          string                  `json:"vin"`
	DefinitionID string                  `json:"definition_id"`
	DeviceMake   coremodels.Manufacturer `json:"device_make"`
	DeviceYear   int32                   `json:"device_year"`
	DeviceModel  string                  `json:"device_model"`
}

type DeleteDeviceTypeCommand added in v0.2.3

type DeleteDeviceTypeCommand struct {
	ID string `json:"id"`
}

func (*DeleteDeviceTypeCommand) Key added in v0.2.3

type DeleteDeviceTypeCommandHandler added in v0.2.3

type DeleteDeviceTypeCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewDeleteDeviceTypeCommandHandler added in v0.2.3

func NewDeleteDeviceTypeCommandHandler(dbs func() *db.ReaderWriter) DeleteDeviceTypeCommandHandler

func (DeleteDeviceTypeCommandHandler) Handle added in v0.2.3

func (ch DeleteDeviceTypeCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error)

type DeleteDeviceTypeCommandResult added in v0.2.3

type DeleteDeviceTypeCommandResult struct {
	ID string `json:"id"`
}

type UpdateDeviceStyleCommand added in v0.1.38

type UpdateDeviceStyleCommand struct {
	ID                 string `json:"id"`
	Name               string `json:"name"`
	ExternalStyleID    string `json:"external_style_id"`
	Source             string `json:"source"`
	SubModel           string `json:"sub_model"`
	HardwareTemplateID string `json:"hardware_template_id,omitempty"`
	DefinitionID       string `json:"definition_id,omitempty"`
}

func (*UpdateDeviceStyleCommand) Key added in v0.1.38

type UpdateDeviceStyleCommandHandler added in v0.1.38

type UpdateDeviceStyleCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdateDeviceStyleCommandHandler added in v0.1.38

func NewUpdateDeviceStyleCommandHandler(dbs func() *db.ReaderWriter) UpdateDeviceStyleCommandHandler

func (UpdateDeviceStyleCommandHandler) Handle added in v0.1.38

func (ch UpdateDeviceStyleCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error)

type UpdateDeviceStyleCommandResult added in v0.1.38

type UpdateDeviceStyleCommandResult struct {
	ID string `json:"id"`
}

type UpdateDeviceTypeCommand added in v0.2.3

type UpdateDeviceTypeCommand struct {
	ID               string                                  `json:"id"`
	Name             string                                  `json:"name"`
	DeviceAttributes []*coremodels.CreateDeviceTypeAttribute `json:"deviceAttributes"`
}

func (*UpdateDeviceTypeCommand) Key added in v0.2.3

type UpdateDeviceTypeCommandHandler added in v0.2.3

type UpdateDeviceTypeCommandHandler struct {
	DBS func() *db.ReaderWriter
}

func NewUpdateDeviceTypeCommandHandler added in v0.2.3

func NewUpdateDeviceTypeCommandHandler(dbs func() *db.ReaderWriter) UpdateDeviceTypeCommandHandler

func (UpdateDeviceTypeCommandHandler) Handle added in v0.2.3

func (ch UpdateDeviceTypeCommandHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error)

type UpdateDeviceTypeCommandResult added in v0.2.3

type UpdateDeviceTypeCommandResult struct {
	ID string `json:"id"`
}

Jump to

Keyboard shortcuts

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