store

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore added in v0.0.17

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

Datastore is a Google Cloud Datastore provider storage backend

func NewDatastore added in v0.0.17

func NewDatastore(entityKind string) (*Datastore, error)

NewDatastore returns a new Google Cloud datastore

func (*Datastore) Close added in v0.0.17

func (d *Datastore) Close() error

Close closes the cloud datastore

func (*Datastore) Read added in v0.0.17

func (d *Datastore) Read(name string) (*model.ProviderVersions, error)

Get returns a value from the domain map

func (*Datastore) Write added in v0.0.17

func (d *Datastore) Write(name string, provider model.ProviderVersions) error

Set adds a key value pair to the domain map

type Map

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

Map is an in memory provider storage backend

func NewMap added in v0.0.17

func NewMap() *Map

NewMap returns a new memory backed storage

func (*Map) Close added in v0.0.17

func (m *Map) Close() error

Close is a noop

func (*Map) Read

func (m *Map) Read(name string) (*model.ProviderVersions, error)

Read reads a provider

func (*Map) Write

func (m *Map) Write(name string, provider model.ProviderVersions) error

Write saves a provider

type Store

type Store interface {
	Read(name string) (*model.ProviderVersions, error)
	Write(name string, provider model.ProviderVersions) error
	Close() error
}

Store provides methods for reading and writing provider versions to a storage backend

Jump to

Keyboard shortcuts

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