keyvalue

package
v0.0.0-...-e613b9d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key = pb.Key

type KeyPrefixer

type KeyPrefixer = pb.KeyPrefixer

type KeyValue

type KeyValue = pb.KeyValue

type KeyValueCloser

type KeyValueCloser interface {
	Close() error
	Delete(context.Context, Keyer) error
	Get(context.Context, Keyer) (KeyValuer, error)
	Put(context.Context, KeyValuer) error
}

type KeyValueWithContext

type KeyValueWithContext struct {
	Context  context.Context
	KeyValue KeyValuer
}

KeyValueWithContext is KeyValue with context.Context.

func (*KeyValueWithContext) GetContext

func (p *KeyValueWithContext) GetContext() context.Context

GetContext returns context.Context.

func (*KeyValueWithContext) GetKeyValue

func (p *KeyValueWithContext) GetKeyValue() KeyValuer

GetKeyValue returns KeyValuer.

func (*KeyValueWithContext) MarshalZerologObject

func (p *KeyValueWithContext) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject writes KeyValueWithContext to given zerolog.Event.

func (*KeyValueWithContext) String

func (p *KeyValueWithContext) String() string

String returns KeyValueWithContext as string.

func (*KeyValueWithContext) Validate

func (p *KeyValueWithContext) Validate() error

Validate returns error if failed validate.

type KeyValueWithContexter

type KeyValueWithContexter interface {
	GetContext() context.Context
	GetKeyValue() pb.KeyValuer
	MarshalZerologObject(*zerolog.Event)
	String() string
	Validate() error
}

KeyValueWithContexter is an interface generated for "github.com/michilu/boilerplate/infra/keyvalue.KeyValueWithContext".

type KeyValuer

type KeyValuer = pb.KeyValuer

type KeyWithContext

type KeyWithContext struct {
	Context context.Context
	Key     Keyer
}

KeyWithContext is Key with context.Context.

func (*KeyWithContext) GetContext

func (p *KeyWithContext) GetContext() context.Context

GetContext returns context.Context.

func (*KeyWithContext) GetKey

func (p *KeyWithContext) GetKey() Keyer

GetKey returns Keyer.

func (*KeyWithContext) MarshalZerologObject

func (p *KeyWithContext) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject writes KeyWithContext to given zerolog.Event.

func (*KeyWithContext) String

func (p *KeyWithContext) String() string

String returns KeyWithContext as string.

func (*KeyWithContext) Validate

func (p *KeyWithContext) Validate() error

Validate returns error if failed validate.

type KeyWithContexter

type KeyWithContexter interface {
	GetContext() context.Context
	GetKey() pb.Keyer
	MarshalZerologObject(*zerolog.Event)
	String() string
	Validate() error
}

KeyWithContexter is an interface generated for "github.com/michilu/boilerplate/infra/keyvalue.KeyWithContext".

type Keyer

type Keyer = pb.Keyer

type LoadSaveCloser

type LoadSaveCloser interface {
	Load(context.Context, KeyPrefixer) (<-chan KeyValuer, error)
	Save(context.Context, KeyValuer) error
	//Delete(context.Context, Keyer) error
	Close() error
}

type TopicKeyValueWithContexter

type TopicKeyValueWithContexter interface {
	// Publish returns a '<-chan KeyValueWithContexter' that joins to the given topic.
	Publish(ctx context.Context, c <-chan KeyValueWithContexter)
	// Publisher returns a 'chan<- KeyValueWithContexter' that joins to the given topic.
	Publisher(ctx context.Context) chan<- KeyValueWithContexter
	// Subscribe returns a 'chan<- KeyValueWithContexter' that joins to the given topic.
	Subscribe(c chan<- KeyValueWithContexter)
}

TopicKeyValueWithContexter is a topic.

func GetTopicKeyValueWithContexter

func GetTopicKeyValueWithContexter(topic interface{}) TopicKeyValueWithContexter

GetTopicKeyValueWithContexter returns a TopicKeyValueWithContexter of the given topic.

type TopicKeyWithContexter

type TopicKeyWithContexter interface {
	// Publish returns a '<-chan KeyWithContexter' that joins to the given topic.
	Publish(ctx context.Context, c <-chan KeyWithContexter)
	// Publisher returns a 'chan<- KeyWithContexter' that joins to the given topic.
	Publisher(ctx context.Context) chan<- KeyWithContexter
	// Subscribe returns a 'chan<- KeyWithContexter' that joins to the given topic.
	Subscribe(c chan<- KeyWithContexter)
}

TopicKeyWithContexter is a topic.

func GetTopicKeyWithContexter

func GetTopicKeyWithContexter(topic interface{}) TopicKeyWithContexter

GetTopicKeyWithContexter returns a TopicKeyWithContexter of the given topic.

Jump to

Keyboard shortcuts

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