persistence

package
v0.0.0-...-7e76064 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCache

type ClientCache interface {
	Add(r common.Resource, tenant core.Tenant) error
	Delete(name string, tenant core.Tenant) error
	Update(r common.Resource, tenant core.Tenant) (common.Resource, error)
	Get(name string, tenant core.Tenant) (common.Resource, error)
	List(tenant core.Tenant) ([]common.Resource, error)
}

PersistenceLayer defines a simple interface to persists Boskos Information

func NewClientCache

func NewClientCache() ClientCache

type Persistence

type Persistence interface {
	Add(r common.Resource, tenant core.Tenant) error
	Delete(name string, tenant core.Tenant) error
	Update(r common.Resource, tenant core.Tenant) (common.Resource, error)
	Get(name string, tenant core.Tenant) (common.Resource, error)
	List(tenant core.Tenant) ([]common.Resource, error)
	AddDynamicResourceLifeCycle(r common.DynamicResourceLifeCycle, tenant core.Tenant) error
	GetDynamicResourceLifeCycle(rtype string, tenant core.Tenant) (common.DynamicResourceLifeCycle, error)
	AddToken(token string, tenant core.Tenant) error
	DeleteToken(tenant core.Tenant) error
	GetTenantFromToken(token, project string) (core.Tenant, error)
	Close()
}

func NewFirestore

func NewFirestore() Persistence

NewResourceMemoryStorage creates an in memory persistence layer

func NewPersistence

func NewPersistence() Persistence

NewMemoryStorage creates an in memory persistence layer

Jump to

Keyboard shortcuts

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