messagestore

package
v0.0.0-...-86bf689 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobMessageStore

type BlobMessageStore struct {
	BlobStore
}

func NewMemMessageStore

func NewMemMessageStore() *BlobMessageStore

func (*BlobMessageStore) DeleteMessage

func (s *BlobMessageStore) DeleteMessage(name string) (*CacheMeta, error)

func (*BlobMessageStore) GetMessage

func (s *BlobMessageStore) GetMessage(name string, pb proto.Message) (*CacheMeta, error)

func (*BlobMessageStore) PutMessage

func (s *BlobMessageStore) PutMessage(name string, pb proto.Message) (*CacheMeta, error)

type BlobStore

type BlobStore interface {
	GetBlob(name string) ([]byte, *CacheMeta, error)
	PutBlob(name string, content []byte) (*CacheMeta, error)
	DeleteBlob(name string) (*CacheMeta, error)
}

type CacheMeta

type CacheMeta struct {
	CacheControl string
	ETag         string
	Expires      time.Time
	LastModified time.Time
}

type DecodeResourceError

type DecodeResourceError struct {
	Name  string
	Cause error
}

func (*DecodeResourceError) Error

func (e *DecodeResourceError) Error() string

type DeleteResourceError

type DeleteResourceError struct {
	Name  string
	Cause error
}

func (*DeleteResourceError) Error

func (e *DeleteResourceError) Error() string

type EncodeResourceError

type EncodeResourceError struct {
	Name  string
	Cause error
}

func (*EncodeResourceError) Error

func (e *EncodeResourceError) Error() string

type GetResourceError

type GetResourceError struct {
	Name  string
	Cause error
}

func (*GetResourceError) Error

func (e *GetResourceError) Error() string

type MemStore

type MemStore struct {
	Blobs map[string][]byte
}

func NewMemBlobStore

func NewMemBlobStore() *MemStore

func (*MemStore) DeleteBlob

func (s *MemStore) DeleteBlob(name string) (*CacheMeta, error)

func (*MemStore) GetBlob

func (s *MemStore) GetBlob(name string) ([]byte, *CacheMeta, error)

func (*MemStore) PutBlob

func (s *MemStore) PutBlob(name string, content []byte) (*CacheMeta, error)

type MessageStore

type MessageStore interface {
	GetMessage(name string, pb proto.Message) (*CacheMeta, error)
	PutMessage(name string, pb proto.Message) (*CacheMeta, error)
	DeleteMessage(name string) (*CacheMeta, error)
}

type NoSuchResource

type NoSuchResource string

func (NoSuchResource) Error

func (e NoSuchResource) Error() string

type PutResourceError

type PutResourceError struct {
	Name  string
	Cause error
}

func (*PutResourceError) Error

func (e *PutResourceError) Error() string

type ReadResourceError

type ReadResourceError struct {
	Name  string
	Cause error
}

func (*ReadResourceError) Error

func (e *ReadResourceError) Error() string

type UnsupportedLocation

type UnsupportedLocation locationpb.Location

func (*UnsupportedLocation) Error

func (e *UnsupportedLocation) Error() string

Jump to

Keyboard shortcuts

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