object

package
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 0 Imported by: 48

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 {
	GetNamespace() string
	GetId() string
}

Interface very basic object interface

type Interfaces

type Interfaces interface {
	GetNamespace() 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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL