model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package model is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	Tail   Vertex
	Head   Vertex
	Weight float32
}

type Graph

type Graph struct {
	VertexMap map[string]Vertex
	Adjacency map[string]map[string]float32
}

func NewGraph

func NewGraph() Graph

func (*Graph) Edges

func (g *Graph) Edges() []Edge

func (*Graph) Vertices

func (g *Graph) Vertices() []Vertex

type LoadQuery

type LoadQuery struct {
	Seed      Vertex
	Step      uint32
	MinWeight float32
	MaxWeight float32
}

func AdjacentQuery

func AdjacentQuery(seed Vertex) LoadQuery

func NeighborQuery

func NeighborQuery(seed Vertex, step uint32) LoadQuery

type MockVertex

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

MockVertex is a mock of Vertex interface.

func NewMockVertex

func NewMockVertex(ctrl *gomock.Controller) *MockVertex

NewMockVertex creates a new mock instance.

func (*MockVertex) EXPECT

func (m *MockVertex) EXPECT() *MockVertexMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockVertex) Key

func (m *MockVertex) Key() string

Key mocks base method.

func (*MockVertex) Value

func (m *MockVertex) Value() interface{}

Value mocks base method.

type MockVertexMockRecorder

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

MockVertexMockRecorder is the mock recorder for MockVertex.

func (*MockVertexMockRecorder) Key

func (mr *MockVertexMockRecorder) Key() *gomock.Call

Key indicates an expected call of Key.

func (*MockVertexMockRecorder) Value

func (mr *MockVertexMockRecorder) Value() *gomock.Call

Value indicates an expected call of Value.

type ProtoVertex

type ProtoVertex struct {
	Message *pb.Vertex `json:"message,omitempty"`
}

func (*ProtoVertex) Bool

func (p *ProtoVertex) Bool() (bool, error)

func (*ProtoVertex) Bytes

func (p *ProtoVertex) Bytes() ([]byte, error)

func (*ProtoVertex) Float32

func (p *ProtoVertex) Float32() (float32, error)

func (*ProtoVertex) Float64

func (p *ProtoVertex) Float64() (float64, error)

func (*ProtoVertex) Int

func (p *ProtoVertex) Int() (int, error)

func (*ProtoVertex) Int32

func (p *ProtoVertex) Int32() (int32, error)

func (*ProtoVertex) Int64

func (p *ProtoVertex) Int64() (int64, error)

func (*ProtoVertex) Key

func (p *ProtoVertex) Key() string

func (*ProtoVertex) Nil

func (p *ProtoVertex) Nil() (interface{}, error)

func (*ProtoVertex) String

func (p *ProtoVertex) String() (string, error)

func (*ProtoVertex) Timestamp

func (p *ProtoVertex) Timestamp() (time.Time, error)

func (*ProtoVertex) Uint32

func (p *ProtoVertex) Uint32() (uint32, error)

func (*ProtoVertex) Uint64

func (p *ProtoVertex) Uint64() (uint64, error)

func (*ProtoVertex) Value

func (p *ProtoVertex) Value() interface{}

type Vertex

type Vertex interface {
	Key() string
	Value() interface{}
}

Jump to

Keyboard shortcuts

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