object

package
v0.0.0-...-0642f7a Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDatabase = "digota"

DefaultDatabase is used if nothing else specified

Variables

This section is empty.

Functions

This section is empty.

Types

type IdSetter

type IdSetter interface {
	SetID(string)
}

IdSetter helps the storage handler creating new object with fresh uuid

type Interface

type Interface interface {
	GetEntity() string
	GetID() string
}

Interface very basic object interface

type Interfaces

type Interfaces interface {
	GetEntity() string
}

Interfaces same as Interface but for slices

type ListOpt

type ListOpt struct {
	Page  int64
	Limit int64
	Sort  Sort
}

ListOpt options for listing objects

type Sort

type Sort int

Sort type for storage handlers

const (
	// SortNatural use natural order
	SortNatural Sort = iota
	// SortCreatedDesc created newest to oldest
	SortCreatedDesc
	// SortCreatedAsc created oldest to newset
	SortCreatedAsc
	// SortUpdatedDesc updated newest to oldest
	SortUpdatedDesc
	// SortUpdatedAsc updated oldest to newset
	SortUpdatedAsc
)

type TimeTracker

type TimeTracker interface {
	SetCreated(t int64)
	GetCreated() int64
	SetUpdated(t int64)
	GetUpdated() int64
}

TimeTracker help storage handlers set created and updated time when needed.

Jump to

Keyboard shortcuts

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