data

package
v0.0.0-...-a7642a0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	ID        string    `bson:"_id,omitempty" json:"id,omitempty"`
	Name      string    `bson:"name" json:"name"`
	Data      string    `bson:"data" json:"data"`
	CreatedAt time.Time `bson:"created_at" json:"created_at"`
	UpdatedAt time.Time `bson:"updated_at" json"updated_at"`
}

func (*LogEntry) All

func (l *LogEntry) All() ([]*LogEntry, error)

func (*LogEntry) GetOne

func (l *LogEntry) GetOne(id string) (*LogEntry, error)

func (*LogEntry) Insert

func (l *LogEntry) Insert(entry LogEntry) error

func (*LogEntry) TruncateCollection

func (l *LogEntry) TruncateCollection() error

func (*LogEntry) Update

func (l *LogEntry) Update() (*mongo.UpdateResult, error)

type Models

type Models struct {
	LogEntry LogEntry
}

func New

func New(mongo *mongo.Client) Models

Jump to

Keyboard shortcuts

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