model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

Node - Node storage

func NewNode

func NewNode(db *gorm.DB) *Node

NewNode - Create a Node storage instance

func (*Node) Create

func (a *Node) Create(ctx context.Context, item schema.Node) error

Create - Create data

func (*Node) Delete

func (a *Node) Delete(ctx context.Context, UUID string) error

Delete - delete data

func (*Node) Get

func (a *Node) Get(ctx context.Context, UUID string, opts ...schema.NodeQueryOptions) (*schema.Node, error)

Get - Query specified data

func (*Node) Query

Query - Query data

func (*Node) Update

func (a *Node) Update(ctx context.Context, UUID string, item schema.Node) error

Update - Update data

type Primitive

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

Primitive - Primitive storage

func NewPrimitive

func NewPrimitive(db *gorm.DB) *Primitive

NewPrimitive - Create a primitive storage instance

func (*Primitive) Create

func (a *Primitive) Create(ctx context.Context, item schema.Primitive) error

Create - Create data

func (*Primitive) Delete

func (a *Primitive) Delete(ctx context.Context, UUID string) error

Delete - delete data

func (*Primitive) Get

Get - Query specified data

func (*Primitive) Query

Query - Query data

func (*Primitive) Update

func (a *Primitive) Update(ctx context.Context, UUID string, item schema.Primitive) error

Update - Update data

Jump to

Keyboard shortcuts

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