domain

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package domain contains domain area types/functions for builder hub

Index

Constants

View Source
const EventGetConfig = "GetConfig"
View Source
const ProductionNetwork = "production"

Variables

View Source
var (
	ErrNotFound           = errors.New("not found")
	ErrIncorrectBuilder   = errors.New("incorrect builder")
	ErrInvalidMeasurement = errors.New("no such active measurement found")
)

Functions

func Bytes2Address

func Bytes2Address(b []byte) *common.Address

Types

type Builder

type Builder struct {
	Name      string `json:"name"`
	IPAddress net.IP `json:"ip_address"`
	IsActive  bool   `json:"is_active"`
	Network   string `json:"network"`
	DNSName   string `json:"dns_name"`
}

type BuilderServices

type BuilderServices struct {
	TLSCert     string
	ECDSAPubKey *common.Address
	Service     string
}

type BuilderWithServices

type BuilderWithServices struct {
	Builder  Builder
	Services []BuilderServices
}

type InmemorySecretService added in v0.2.0

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

func NewMockSecretService added in v0.2.0

func NewMockSecretService() *InmemorySecretService

func (*InmemorySecretService) GetSecretValues added in v0.2.0

func (mss *InmemorySecretService) GetSecretValues(builderName string) (json.RawMessage, error)

func (*InmemorySecretService) SetSecretValues added in v0.2.0

func (mss *InmemorySecretService) SetSecretValues(builderName string, values json.RawMessage) error

type Measurement

type Measurement struct {
	Name            string
	AttestationType string
	Measurement     map[string]SingleMeasurement
}

func NewMeasurement

func NewMeasurement(name, attestationType string, measurements map[string]SingleMeasurement) *Measurement

type SingleMeasurement

type SingleMeasurement struct {
	Expected    string   `json:"expected,omitempty"`
	ExpectedAny []string `json:"expected_any,omitempty"`
}

SingleMeasurement represents a single measurement with one or more expected values. Use Expected for a single value, or ExpectedAny for multiple values with OR semantics.

func (SingleMeasurement) GetExpectedValues added in v0.4.0

func (s SingleMeasurement) GetExpectedValues() []string

GetExpectedValues returns the list of expected values. If ExpectedAny is set, it returns those values. Otherwise, it returns Expected as a single-element slice.

Jump to

Keyboard shortcuts

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