data

package
v0.0.0-...-bf14b0d Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: GPL-3.0 Imports: 7 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"`
}

Single Log Entry

func (*LogEntry) DropCollection

func (l *LogEntry) DropCollection(id string) error

func (*LogEntry) GetALog

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

func (*LogEntry) GetAllLogs

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

get all logs from collection

func (*LogEntry) Insert

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

insert a log entry

func (*LogEntry) Update

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

type Models

type Models struct {
	LogEntry LogEntry
}

Model is a type for the data package

func New

func New(mClient *mongo.Client) Models

Creates an instance of the data package. Returns Model struct which has all types available to the app

Jump to

Keyboard shortcuts

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