model

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	// Identifier is how the client refers to the object.
	Identifier string `json:"identifier"`

	// Data is an abstract json object
	Data map[string]interface{} `json:"data"`

	// TTL is the time to live in storage. If not provided and if the storage requires it the default configuration will be used.
	TTL int64 `json:"ttl,omitempty"`
}

Item defines the abstract item to be stored.

type Key

type Key struct {
	// Bucket is a collection of items.
	Bucket string `json:"bucket"`

	// ID is the unique ID for an item in a bucket
	ID string `json:"id"`
}

Key defines the field mapping to retrieve an item from storage.

Jump to

Keyboard shortcuts

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