setup

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDBID added in v1.2.2

func GetDBID(contractInfo ContractInfo) string

GetDBID generates a DBID from contract info

func InsertMarkdownPrimitiveData

func InsertMarkdownPrimitiveData(ctx context.Context, input InsertMarkdownDataInput) error

InsertMarkdownPrimitiveData inserts data from a markdown table into a primitive stream

func SetupAndInitializeContract added in v1.2.2

func SetupAndInitializeContract(ctx context.Context, platform *kwilTesting.Platform, contractInfo ContractInfo) error

SetupAndInitializeContract sets up and initializes a contract for testing.

func SetupComposedFromMarkdown

func SetupComposedFromMarkdown(ctx context.Context, input MarkdownComposedSetupInput) error

func SetupComposedStream added in v1.2.2

func SetupComposedStream(ctx context.Context, input SetupComposedStreamInput) error

SetupComposedStream sets up a composed stream

func SetupPrimitiveFromMarkdown

func SetupPrimitiveFromMarkdown(ctx context.Context, input MarkdownPrimitiveSetupInput) error

Types

type ComposedStreamDefinition

type ComposedStreamDefinition struct {
	StreamLocator       types.StreamLocator
	TaxonomyDefinitions types.Taxonomy
}

type ContractInfo added in v1.2.2

type ContractInfo struct {
	Name     string
	StreamID util.StreamId
	Deployer util.EthereumAddress
	Content  []byte
	Type     ContractType
}

type ContractType added in v1.2.2

type ContractType string
const (
	ContractTypePrimitive ContractType = "primitive"
	ContractTypeComposed  ContractType = "composed"
)

type InitializeContractInput

type InitializeContractInput struct {
	Platform *kwilTesting.Platform
	Deployer util.EthereumAddress
	Dbid     string
	Height   int64
}

type InsertMarkdownDataInput

type InsertMarkdownDataInput struct {
	Platform *kwilTesting.Platform
	Height   int64
	// we use locator instead because it could be a third party data provider
	StreamLocator types.StreamLocator
	MarkdownData  string
}

type InsertPrimitiveDataInput

type InsertPrimitiveDataInput struct {
	Platform *kwilTesting.Platform
	// contains filtered or unexported fields
}

type InsertRecordInput

type InsertRecordInput struct {
	DateValue civil.Date
	Value     string
}

type MarkdownComposedSetupInput

type MarkdownComposedSetupInput struct {
	Platform     *kwilTesting.Platform
	StreamId     string
	MarkdownData string
	// optional. If not provided, each will have a weight of 1
	Weights []string
	Height  int64
}

type MarkdownPrimitiveSetupInput

type MarkdownPrimitiveSetupInput struct {
	Platform     *kwilTesting.Platform
	StreamId     util.StreamId
	Height       int64
	MarkdownData string
}

type PrimitiveStreamDefinition

type PrimitiveStreamDefinition struct {
	StreamLocator types.StreamLocator
}

type PrimitiveStreamWithData

type PrimitiveStreamWithData struct {
	PrimitiveStreamDefinition
	Data []InsertRecordInput
}

type SetTaxonomyInput

type SetTaxonomyInput struct {
	Platform *kwilTesting.Platform
	// contains filtered or unexported fields
}

type SetupComposedAndPrimitivesInput

type SetupComposedAndPrimitivesInput struct {
	ComposedStreamDefinition ComposedStreamDefinition
	PrimitiveStreamsWithData []PrimitiveStreamWithData
	Platform                 *kwilTesting.Platform
	Height                   int64
}

type SetupComposedStreamInput added in v1.2.2

type SetupComposedStreamInput struct {
	Platform *kwilTesting.Platform
	StreamId util.StreamId
	Height   int64
}

type SetupPrimitiveInput

type SetupPrimitiveInput struct {
	Platform                *kwilTesting.Platform
	Height                  int64
	PrimitiveStreamWithData PrimitiveStreamWithData
}

Jump to

Keyboard shortcuts

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