httphandlers

package
v0.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// TokenIDParam is the parameter name for the vehicle token id.
	TokenIDParam = "tokenId"

	// StatusGroupParam is the parameter name for the status group.
	StatusGroupParam = "group"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPController added in v0.0.6

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

HTTPController handles VIN VC-related http requests.

func NewVCController

func NewVCController(vinService VINVCService, pomService POMVCService, telemetryURL string) (*HTTPController, error)

NewVCController creates a new http VCController.

func (*HTTPController) CreateVINAttestation added in v0.1.0

func (v *HTTPController) CreateVINAttestation(fiberCtx *fiber.Ctx) error

@Summary Create VIN Attestation @Description Generate a new VIN attestation for a given token Id of a vehicle NFT. @Tags VINVC @Accept json @Produce json @Param tokenId path int true "token Id of the vehicle NFT" @Success 200 {object} getVCResponse @Security BearerAuth @Router /v2/attestation/vin/{tokenId} [post]

type POMVCService added in v0.0.6

type POMVCService interface {
	CreatePOMVC(ctx context.Context, tokenID uint32) error
}

type VINVCService

type VINVCService interface {
	CreateAndStoreVINAttestation(ctx context.Context, tokenID uint32) (*cloudevent.RawEvent, error)
}

VINVCService defines the interface for VIN VC operations.

Jump to

Keyboard shortcuts

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