manager

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileExistsError

func NewFileExistsError(file string) error

New returns an error that formats as the given text.

Types

type FileExistsError

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

FileExistsError is an error returned when a file with the same name as the config already exists

func (*FileExistsError) Error

func (e *FileExistsError) Error() string

type FileManager

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

FileManager persists the manifest to a file

func (FileManager) Init

func (m FileManager) Init(apiVersion string, dependencies ...dependency.Spec) (*dependency.Manifest, error)

func (FileManager) Read

func (m FileManager) Read() (*dependency.Manifest, error)

Read file and unmarshal the yaml

func (FileManager) Write

func (m FileManager) Write(manifest dependency.Manifest) error

Marshal and write to yaml file

type FirestoreManager added in v0.4.0

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

FirestoreManager persists the manifest to a Firebase database

func (FirestoreManager) Init added in v0.4.0

func (m FirestoreManager) Init(apiVersion string, dependencies ...dependency.Spec) (*dependency.Manifest, error)

func (FirestoreManager) Read added in v0.4.0

func (FirestoreManager) Write added in v0.4.0

func (m FirestoreManager) Write(manifest dependency.Manifest) error

type ReadWriter

type ReadWriter interface {
	Init(apiVersion string, dependencies ...dependency.Spec) (*dependency.Manifest, error)
	Read() (*dependency.Manifest, error)
	Write(manifest dependency.Manifest) error
}

ReadWriter persists dependencies

func NewFileManager

func NewFileManager(filePath string) ReadWriter

func NewFirestoreManager added in v0.4.0

func NewFirestoreManager(projectID, collection, doc string) (ReadWriter, error)

func NewFirestoreManagerWithCredentialsJSON added in v0.4.0

func NewFirestoreManagerWithCredentialsJSON(projectID, collection, doc string, credentialsJSON []byte) (ReadWriter, error)

Jump to

Keyboard shortcuts

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