deployment

package
v0.0.0-...-efbdb50 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSubgraph

func CreateSubgraph(ctx context.Context, db *sqlx.DB, subgraphDef *subgraph.Definition, subgraphName string) error

func DeploySubgraph

func DeploySubgraph(ctx context.Context, db *sqlx.DB, subgraphDef *subgraph.Definition, ipfsNode *IPFSNode, subgraphName string) error

func GetRandomNames

func GetRandomNames(number int) ([]string, error)

func SetupDBSchema

func SetupDBSchema(ctx context.Context, db *sqlx.DB, subgraphDef *subgraph.Definition, schema string) error

Types

type IPFSAddResponse

type IPFSAddResponse struct {
	Hash string
	File string
}

type IPFSNode

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

func NewIPFSNode

func NewIPFSNode(address string) *IPFSNode

func (*IPFSNode) UploadManifest

func (ipfs *IPFSNode) UploadManifest(subgraphDef *subgraph.Definition) (string, []string, error)

type Subgraph

type Subgraph struct {
	ID             string            `db:"id"`
	Name           string            `db:"name"`
	CurrentVersion string            `db:"current_version,nullable"`
	PendingVersion string            `db:"pending_version,nullable"`
	CreatedAt      string            `db:"created_at"`
	VID            int64             `db:"vid"`
	BlockRange     entity.BlockRange `db:"block_range"`
}

type SubgraphVersion

type SubgraphVersion struct {
	SubgraphID       string `db:"subgraph_id"`
	DeploymentID     string `db:"deployment_id"`
	VersionID        string `db:"version_id"`
	Schema           string `db:"schema"`
	IsCurrentVersion bool   `db:"is_current_version"`
	IsPendingVersion bool   `db:"is_pending_version"`
}

func GetSubgraphVersion

func GetSubgraphVersion(ctx context.Context, db *sqlx.DB, subgraphName, versionID string) (*SubgraphVersion, error)

func GetSubgraphVersions

func GetSubgraphVersions(ctx context.Context, db *sqlx.DB, subgraphName string) ([]*SubgraphVersion, error)

Jump to

Keyboard shortcuts

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