biz

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewMapper)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Edge added in v0.0.2

type Edge struct {
	SourceID      int64
	DestinationID int64
	Type          EdgeType
}

type EdgeType added in v0.0.2

type EdgeType int
const (
	EdgeTypeUnspecified EdgeType = iota
	EdgeTypeGeneral
	EdgeTypeEqual
	EdgeTypeCreate
	EdgeTypeEnjoy
	EdgeTypeMention
	EdgeTypeDerive
	EdgeTypeControl
	EdgeTypeFollow
	EdgeTypeDescribe
)

type Mapper

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

func NewMapper added in v0.0.2

func NewMapper(repo MapperRepo) *Mapper

func (*Mapper) FetchEqualVertex added in v0.0.2

func (m *Mapper) FetchEqualVertex(ctx context.Context, v Vertex) ([]*Vertex, error)

func (*Mapper) InsertEdge added in v0.0.2

func (m *Mapper) InsertEdge(ctx context.Context, e []*Edge) error

func (*Mapper) InsertVertex added in v0.0.2

func (m *Mapper) InsertVertex(ctx context.Context, v []*Vertex) error

type MapperRepo

type MapperRepo interface {
	InsertVertex(context.Context, []*Vertex) error
	InsertEdge(context.Context, []*Edge) error
	FetchEqualVertex(context.Context, Vertex) ([]*Vertex, error)
}

type Vertex added in v0.0.2

type Vertex struct {
	ID   int64
	Type VertexType
}

type VertexType added in v0.0.2

type VertexType int
const (
	VertexTypeUnspecified VertexType = iota
	VertexTypeAbstract
	VertexTypeEntity
	VertexTypeMessage
	VertexTypeObject
	VertexTypeMetadata
)

Jump to

Keyboard shortcuts

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