model

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllAlgorithm = []Algorithm{
	AlgorithmBfs,
	AlgorithmDfs,
}

Functions

This section is empty.

Types

type AggFilter

type AggFilter struct {
	Filter    *Filter   `json:"filter"`
	Aggregate Aggregate `json:"aggregate"`
	Field     *string   `json:"field"`
}

type Aggregate

type Aggregate string
const (
	AggregateCount Aggregate = "COUNT"
	AggregateSum   Aggregate = "SUM"
	AggregateAvg   Aggregate = "AVG"
	AggregateMax   Aggregate = "MAX"
	AggregateMin   Aggregate = "MIN"
	AggregateProd  Aggregate = "PROD"
)

func (Aggregate) IsValid

func (e Aggregate) IsValid() bool

func (Aggregate) MarshalGQL

func (e Aggregate) MarshalGQL(w io.Writer)

func (Aggregate) String

func (e Aggregate) String() string

func (*Aggregate) UnmarshalGQL

func (e *Aggregate) UnmarshalGQL(v interface{}) error

type Algorithm

type Algorithm string
const (
	AlgorithmBfs Algorithm = "BFS"
	AlgorithmDfs Algorithm = "DFS"
)

func (Algorithm) IsValid

func (e Algorithm) IsValid() bool

func (Algorithm) MarshalGQL

func (e Algorithm) MarshalGQL(w io.Writer)

func (Algorithm) String

func (e Algorithm) String() string

func (*Algorithm) UnmarshalGQL

func (e *Algorithm) UnmarshalGQL(v interface{}) error

type AuthTarget

type AuthTarget struct {
	User    *Doc                   `json:"user"`
	Target  map[string]interface{} `json:"target"`
	Headers map[string]interface{} `json:"headers"`
}

type Authorizer

type Authorizer struct {
	Name            string `json:"name"`
	Method          string `json:"method"`
	Expression      string `json:"expression"`
	TargetRequests  bool   `json:"target_requests"`
	TargetResponses bool   `json:"target_responses"`
}

type AuthorizerInput

type AuthorizerInput struct {
	Name            string `json:"name"`
	Method          string `json:"method"`
	Expression      string `json:"expression"`
	TargetRequests  bool   `json:"target_requests"`
	TargetResponses bool   `json:"target_responses"`
}

type Authorizers

type Authorizers struct {
	Authorizers []*Authorizer `json:"authorizers"`
}

type AuthorizersInput

type AuthorizersInput struct {
	Authorizers []*AuthorizerInput `json:"authorizers"`
}

type ConnectFilter

type ConnectFilter struct {
	DocRef     *RefInput `json:"doc_ref"`
	Gtype      string    `json:"gtype"`
	Expression *string   `json:"expression"`
	Limit      int       `json:"limit"`
	Sort       *string   `json:"sort"`
	Seek       *string   `json:"seek"`
	Reverse    *bool     `json:"reverse"`
}

type Connection

type Connection struct {
	Ref        *Ref                   `json:"ref"`
	Attributes map[string]interface{} `json:"attributes"`
	Directed   bool                   `json:"directed"`
	From       *Ref                   `json:"from"`
	To         *Ref                   `json:"to"`
}

type ConnectionConstructor

type ConnectionConstructor struct {
	Ref        *RefConstructor        `json:"ref"`
	Directed   bool                   `json:"directed"`
	Attributes map[string]interface{} `json:"attributes"`
	From       *RefInput              `json:"from"`
	To         *RefInput              `json:"to"`
}

type ConnectionConstructors

type ConnectionConstructors struct {
	Connections []*ConnectionConstructor `json:"connections"`
}

type Connections

type Connections struct {
	Connections []*Connection `json:"connections"`
	SeekNext    *string       `json:"seek_next"`
}

type Constraint

type Constraint struct {
	Name              string `json:"name"`
	Gtype             string `json:"gtype"`
	Expression        string `json:"expression"`
	TargetDocs        bool   `json:"target_docs"`
	TargetConnections bool   `json:"target_connections"`
}

type ConstraintInput

type ConstraintInput struct {
	Name              string `json:"name"`
	Gtype             string `json:"gtype"`
	Expression        string `json:"expression"`
	TargetDocs        bool   `json:"target_docs"`
	TargetConnections bool   `json:"target_connections"`
}

type Constraints

type Constraints struct {
	Constraints []*Constraint `json:"constraints"`
}

type ConstraintsInput

type ConstraintsInput struct {
	Constraints []*ConstraintInput `json:"constraints"`
}

type Doc

type Doc struct {
	Ref        *Ref                   `json:"ref"`
	Attributes map[string]interface{} `json:"attributes"`
}

type DocConstructor

type DocConstructor struct {
	Ref        *RefConstructor        `json:"ref"`
	Attributes map[string]interface{} `json:"attributes"`
}

type DocConstructors

type DocConstructors struct {
	Docs []*DocConstructor `json:"docs"`
}

type Docs

type Docs struct {
	Docs     []*Doc  `json:"docs"`
	SeekNext *string `json:"seek_next"`
}

type Edit

type Edit struct {
	Ref        *RefInput              `json:"ref"`
	Attributes map[string]interface{} `json:"attributes"`
}

type EditFilter

type EditFilter struct {
	Filter     *Filter                `json:"filter"`
	Attributes map[string]interface{} `json:"attributes"`
}

type ExistsFilter

type ExistsFilter struct {
	Gtype      string  `json:"gtype"`
	Expression string  `json:"expression"`
	Seek       *string `json:"seek"`
	Reverse    *bool   `json:"reverse"`
	Index      *string `json:"index"`
}

type ExprFilter

type ExprFilter struct {
	Expression *string `json:"expression"`
}

type Filter

type Filter struct {
	Gtype      string  `json:"gtype"`
	Expression *string `json:"expression"`
	Limit      int     `json:"limit"`
	Sort       *string `json:"sort"`
	Seek       *string `json:"seek"`
	Reverse    *bool   `json:"reverse"`
	Index      *string `json:"index"`
}

type Index

type Index struct {
	Name              string `json:"name"`
	Gtype             string `json:"gtype"`
	Expression        string `json:"expression"`
	TargetDocs        bool   `json:"target_docs"`
	TargetConnections bool   `json:"target_connections"`
}

type IndexInput

type IndexInput struct {
	Name              string `json:"name"`
	Gtype             string `json:"gtype"`
	Expression        string `json:"expression"`
	TargetDocs        bool   `json:"target_docs"`
	TargetConnections bool   `json:"target_connections"`
}

type Indexes

type Indexes struct {
	Indexes []*Index `json:"indexes"`
}

type IndexesInput

type IndexesInput struct {
	Indexes []*IndexInput `json:"indexes"`
}

type Membership

type Membership string
const (
	MembershipUnknown   Membership = "UNKNOWN"
	MembershipFollower  Membership = "FOLLOWER"
	MembershipCandidate Membership = "CANDIDATE"
	MembershipLeader    Membership = "LEADER"
	MembershipShutdown  Membership = "SHUTDOWN"
)

func (Membership) IsValid

func (e Membership) IsValid() bool

func (Membership) MarshalGQL

func (e Membership) MarshalGQL(w io.Writer)

func (Membership) String

func (e Membership) String() string

func (*Membership) UnmarshalGQL

func (e *Membership) UnmarshalGQL(v interface{}) error

type Message

type Message struct {
	Channel   string                 `json:"channel"`
	Data      map[string]interface{} `json:"data"`
	User      *Ref                   `json:"user"`
	Timestamp time.Time              `json:"timestamp"`
	Method    string                 `json:"method"`
}

type OutboundMessage

type OutboundMessage struct {
	Channel string                 `json:"channel"`
	Data    map[string]interface{} `json:"data"`
}

type Peer

type Peer struct {
	NodeID string `json:"node_id"`
	Addr   string `json:"addr"`
}

type PeerInput

type PeerInput struct {
	NodeID string `json:"node_id"`
	Addr   string `json:"addr"`
}

type PutConnection

type PutConnection struct {
	Ref        *RefInput              `json:"ref"`
	Attributes map[string]interface{} `json:"attributes"`
	Directed   bool                   `json:"directed"`
	From       *RefInput              `json:"from"`
	To         *RefInput              `json:"to"`
}

type PutConnections

type PutConnections struct {
	Connections []*PutConnection `json:"connections"`
}

type PutDoc

type PutDoc struct {
	Ref        *RefInput              `json:"ref"`
	Attributes map[string]interface{} `json:"attributes"`
}

type PutDocs

type PutDocs struct {
	Docs []*PutDoc `json:"docs"`
}

type RaftState

type RaftState struct {
	Leader     string                 `json:"leader"`
	Membership Membership             `json:"membership"`
	Peers      []*Peer                `json:"peers"`
	Stats      map[string]interface{} `json:"stats"`
}

type Ref

type Ref struct {
	Gtype string `json:"gtype"`
	Gid   string `json:"gid"`
}

type RefConstructor

type RefConstructor struct {
	Gtype string  `json:"gtype"`
	Gid   *string `json:"gid"`
}

type RefInput

type RefInput struct {
	Gtype string `json:"gtype"`
	Gid   string `json:"gid"`
}

type Refs

type Refs struct {
	Refs []*Ref `json:"refs"`
}

type Schema

type Schema struct {
	ConnectionTypes []string     `json:"connection_types"`
	DocTypes        []string     `json:"doc_types"`
	Authorizers     *Authorizers `json:"authorizers"`
	Constraints     *Constraints `json:"constraints"`
	Indexes         *Indexes     `json:"indexes"`
	Triggers        *Triggers    `json:"triggers"`
}

type SearchConnectFilter

type SearchConnectFilter struct {
	Filter     *Filter                `json:"filter"`
	Gtype      string                 `json:"gtype"`
	Attributes map[string]interface{} `json:"attributes"`
	Directed   bool                   `json:"directed"`
	From       *RefInput              `json:"from"`
}

type SearchConnectMeFilter

type SearchConnectMeFilter struct {
	Filter     *Filter                `json:"filter"`
	Gtype      string                 `json:"gtype"`
	Attributes map[string]interface{} `json:"attributes"`
	Directed   bool                   `json:"directed"`
}

type StreamFilter

type StreamFilter struct {
	Channel    string     `json:"channel"`
	Expression *string    `json:"expression"`
	Min        *time.Time `json:"min"`
	Max        *time.Time `json:"max"`
}

type Traversal

type Traversal struct {
	Doc           *Doc   `json:"doc"`
	TraversalPath []*Ref `json:"traversal_path"`
	Depth         int    `json:"depth"`
	Hops          int    `json:"hops"`
}

type Traversals

type Traversals struct {
	Traversals []*Traversal `json:"traversals"`
}

type TraverseFilter

type TraverseFilter struct {
	Root                 *RefInput  `json:"root"`
	DocExpression        *string    `json:"doc_expression"`
	ConnectionExpression *string    `json:"connection_expression"`
	Limit                int        `json:"limit"`
	Sort                 *string    `json:"sort"`
	Reverse              *bool      `json:"reverse"`
	Algorithm            *Algorithm `json:"algorithm"`
	MaxDepth             int        `json:"max_depth"`
	MaxHops              int        `json:"max_hops"`
}

type TraverseMeFilter

type TraverseMeFilter struct {
	DocExpression        *string    `json:"doc_expression"`
	ConnectionExpression *string    `json:"connection_expression"`
	Limit                int        `json:"limit"`
	Sort                 *string    `json:"sort"`
	Reverse              *bool      `json:"reverse"`
	Algorithm            *Algorithm `json:"algorithm"`
	MaxDepth             int        `json:"max_depth"`
	MaxHops              int        `json:"max_hops"`
}

type Trigger

type Trigger struct {
	Name              string `json:"name"`
	Gtype             string `json:"gtype"`
	Trigger           string `json:"trigger"`
	TargetDocs        bool   `json:"target_docs"`
	TargetConnections bool   `json:"target_connections"`
}

type TriggerInput

type TriggerInput struct {
	Name              string `json:"name"`
	Gtype             string `json:"gtype"`
	Trigger           string `json:"trigger"`
	TargetDocs        bool   `json:"target_docs"`
	TargetConnections bool   `json:"target_connections"`
}

type Triggers

type Triggers struct {
	Triggers []*Trigger `json:"triggers"`
}

type TriggersInput

type TriggersInput struct {
	Triggers []*TriggerInput `json:"triggers"`
}

Jump to

Keyboard shortcuts

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