record

package
v0.0.0-...-bd06b18 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Key     DocumentKey            `json:"key,omitempty" description:"取り出しキー名"`
	Data    map[string]interface{} `json:"document" description:"保管内容"`
	Referer string                 `json:"referer" description:"登録元URL"`
	Expire  int32                  `json:"expire,omitempty" description:"投稿データ保存時間(秒)"`
}

Document temporary document

type DocumentKey

type DocumentKey string

type Documenter

type Documenter interface {
	RetrieveDocument(key DocumentKey) (*ReadDocument, error)
	SaveDocument(document WriteDocument) error
}

func NewRecorder

func NewRecorder(config *config.TomlConfig) Documenter

type Memcached

type Memcached struct {
	// contains filtered or unexported fields
}

Memcached memcached client

func NewMemcachedConnect

func NewMemcachedConnect(servers ...string) *Memcached

NewMemcachedConnect memcached connector

func (*Memcached) RetrieveDocument

func (m *Memcached) RetrieveDocument(key DocumentKey) (*ReadDocument, error)

func (*Memcached) SaveDocument

func (m *Memcached) SaveDocument(document WriteDocument) error

type ReadDocument

type ReadDocument struct {
	Document
	CreatedAt string `json:"created_at,omitempty" description:"データ作成日時"`
}

type WriteDocument

type WriteDocument struct {
	Document
}

Jump to

Keyboard shortcuts

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