constellation

package
v0.0.0-...-80937f0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2020-2021 William Perron. All rights reserved. MIT License.

Copyright 2020-2021 William Perron. All rights reserved. MIT License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSchema

func InitSchema(ctx context.Context) error

func InsertFiles

func InsertFiles(ctx context.Context, mods chan deno.DenoInfo) chan bool

InsertFiles iterates over a channel of DenoInfo and inserts every specifier in it in the DGraph cluster

func InsertModules

func InsertModules(ctx context.Context, mods chan deno.Module) chan deno.Module

InsertModules is a passthrough function that makes sure the Module and ModuleVersion exist in the graph before inserting the Version's files.

func PutEntry

func PutEntry(item Item) error

Types

type File

type File struct {
	Uid       string   `json:"uid,omitempty"`
	Specifier string   `json:"specifier,omitempty"`
	DependsOn []File   `json:"depends_on,omitempty"`
	DType     []string `json:"dgraph.type,omitempty"`
}

type Item

type Item struct {
	Specifier string `json:"specifier"`
	Uid       string `json:"uid,omitempty"`
}

func GetEntry

func GetEntry(specifier string) (Item, error)

type Module

type Module struct {
	Uid         string          `json:"uid,omitempty"`
	Name        string          `json:"name,omitempty"`
	Stars       int             `json:"stars,omitempty"`
	Description string          `json:"description,omitempty"`
	Version     []ModuleVersion `json:"version,omitempty"`
	DType       []string        `json:"dgraph.type,omitempty"`
}

type ModuleVersion

type ModuleVersion struct {
	Uid           string `json:"uid,omitempty"`
	ModuleVersion string `json:"module_version,omitempty"`
	README        string `json:"README,omitempty"`
}

Jump to

Keyboard shortcuts

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