validation

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendHandler added in v0.1.18

func AppendHandler(handler http.Handler, scheduler api.Scheduler, privateKey *rsa.PrivateKey) http.Handler

NewHandler creates a new Handler with the given HTTP handler

Types

type Asset

type Asset interface {
	GetBlock(ctx context.Context) (blocks.Block, error)
}

type Checker

type Checker interface {
	GetAssetForValidation(ctx context.Context, randomSeed int64) (Asset, error)
}

type Handler added in v0.1.18

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

func (*Handler) ServeHTTP added in v0.1.18

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP checks if the request path starts with the IPFS path prefix and delegates to the appropriate handler

type Validation

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

func NewValidation

func NewValidation(c Checker, device *device.Device) *Validation

NewValidation creates a new Validation instance

func (*Validation) ExecuteValidation

func (v *Validation) ExecuteValidation(ctx context.Context, req *api.ValidateReq) error

ExecuteValidation performs the validation process

func (*Validation) SetFunc

func (v *Validation) SetFunc(fun func() string)

type WebSocket added in v0.1.18

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

Jump to

Keyboard shortcuts

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