project

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Paused                bool
	RequestedProverAmount uint64
}

type Config

type Config struct {
	Version  string `json:"version"`
	VMTypeID uint64 `json:"vmTypeID"`
	Code     string `json:"code"`
	Metadata string `json:"metadata,omitempty"`
}

type ContractProject

type ContractProject func(projectID *big.Int) (string, common.Hash, error)

type Manager

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

func NewManager

func NewManager(cp ContractProject, pf ProjectFile, upf UpsertProjectFile) *Manager

func (*Manager) Project

func (m *Manager) Project(projectID *big.Int) (*Project, error)

type Meta

type Meta struct {
	ProjectID *big.Int
	Uri       string
	Hash      [32]byte
}

func (*Meta) FetchProjectFile

func (m *Meta) FetchProjectFile() ([]byte, error)

type Project

type Project struct {
	DefaultVersion string    `json:"defaultVersion,omitempty"`
	Configs        []*Config `json:"config"`
}

TODO: prefer protobuf for serialization and deserialization

func (*Project) Config

func (p *Project) Config(version string) (*Config, error)

func (*Project) DefaultConfig

func (p *Project) DefaultConfig() (*Config, error)

func (*Project) Marshal added in v0.21.0

func (p *Project) Marshal() ([]byte, error)

func (*Project) Unmarshal added in v0.21.0

func (p *Project) Unmarshal(data []byte) error

type ProjectFile added in v0.16.0

type ProjectFile func(projectID *big.Int) ([]byte, common.Hash, error)

type UpsertProjectFile added in v0.16.0

type UpsertProjectFile func(projectID *big.Int, file []byte, hash common.Hash) error

Jump to

Keyboard shortcuts

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