silk

package
v0.0.0-...-3a6b306 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SHORT_ID_BUF_LEN = 12
	SESSION_KEY_LEN  = 64
)
View Source
const (
	EXPORT_HARD_LIMIT = 30
)

Variables

This section is empty.

Functions

func DoRequest

func DoRequest(req web.RequestInterface, fn, method, url string, payload *bytes.Buffer) (*web.ResponseStatus, []byte)

func Hash256

func Hash256(input []byte) string

func SendRequests

func SendRequests(req web.RequestInterface, fn, method, url string, retries int, data interface{}) (*web.ResponseStatus, []byte)

SendRequests makes get requests and returns success/fail and a byte array on success

Types

type Edge

type Edge struct {
	Phase     bool
	InKey     string
	Predicate string
	OutKey    string
	State     bool
}

type NewVertex

type NewVertex struct {
	Class    *graph.Class
	ParamKey string
}

type System

type System struct {
	Log logging.Logger
	DB  *graph.Database
	// Random ID for this execution instance
	InstanceID string
	Classes    map[string]*SystemClass
	DBClient   graph.Client
	QC         *query.Client
	Root       *common.Node
	sync.RWMutex
}

func NewSystem

func NewSystem(subdomain, domain string, credentials graph.Credentials) (*System, interface{})

func (*System) AddClass

func (system *System) AddClass(key string) *SystemClass

func (*System) AddListMethods

func (system *System) AddListMethods(node *common.Node, f func(req web.RequestInterface) *web.ResponseStatus)

func (*System) Class

func (system *System) Class(name string) *SystemClass

func (*System) DatabaseClass

func (system *System) DatabaseClass() *validation.Config

func (*System) GenClassEndpoints

func (system *System) GenClassEndpoints(class *graph.Class, group *sync.WaitGroup)

func (*System) GenerateAPI

func (system *System) GenerateAPI()

Generates API endpoints.

func (*System) MW_authenticate

func (system *System) MW_authenticate(ware *common.Middleware, req web.RequestInterface, arg interface{}) *web.ResponseStatus

func (*System) MW_createVertex

func (system *System) MW_createVertex(ware *common.Middleware, req web.RequestInterface, arg interface{}) *web.ResponseStatus

func (*System) MW_edgeState

func (system *System) MW_edgeState(ware *common.Middleware, req web.RequestInterface, arg interface{}) *web.ResponseStatus

func (*System) MW_getProperty

func (system *System) MW_getProperty(ware *common.Middleware, req web.RequestInterface, arg interface{}) *web.ResponseStatus

func (*System) MW_lookupVertex

func (system *System) MW_lookupVertex(ware *common.Middleware, req web.RequestInterface, arg interface{}) *web.ResponseStatus

func (*System) MW_return

func (system *System) MW_return(ware *common.Middleware, req web.RequestInterface, arg interface{}) *web.ResponseStatus

func (*System) Phase

func (system *System) Phase() *validation.Config

func (*System) Subject

func (system *System) Subject() *validation.Config

func (*System) VectorAPI

func (system *System) VectorAPI(class, counterClass *graph.Class, relationship *graph.Relationship, group *sync.WaitGroup)

type SystemClass

type SystemClass struct {
	System       *System
	DB           *graph.Database
	Class        *graph.Class
	Node         *common.Node
	InstanceNode *common.Node
}

func (*SystemClass) AddProperty

func (sysClass *SystemClass) AddProperty(key string, vc *validation.Config)
func (sysClass *SystemClass) Link(predicate string, otherClass *SystemClass)

func (*SystemClass) SetAsAnchor

func (sysClass *SystemClass) SetAsAnchor() *SystemClass

defines the class as anchor vertices

func (*SystemClass) SetAsUser

func (sysClass *SystemClass) SetAsUser() *SystemClass

defines the class to use as a user vertex

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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