interfaces

package
v0.0.0-...-3329678 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitStorageInterface

type CircuitStorageInterface interface {
	// Tries to load a circuit with a given id
	LoadCircuit(id model.CircuitId) *model.Circuit
	// gets all circuits accessible to a user
	EnumerateCircuits(userId model.UserId) []model.CircuitMetadata
	// Updates an existing circuit
	UpdateCircuit(c model.Circuit)
	// Makes a new blank circuit
	NewCircuit() model.Circuit
	// Deletes a circuit by ID
	DeleteCircuit(id model.CircuitId)
	// Releases the resources the interface holds.  No guarantees are made about the state of this object beyond this
	// point.  Call this when done using the interface.
	Close()
}

Represents an interface to a circuit storage system that simply performs the requested operation. Implementations do not modify the provided circuits.

type CircuitStorageInterfaceFactory

type CircuitStorageInterfaceFactory interface {
	CreateCircuitStorageInterface() CircuitStorageInterface
}

Generates interfaces to a storage systems, but each interface returned should be associated with the same storage

system.  This is not required to generate unique instances if that is not required by the underlying storage system

Jump to

Keyboard shortcuts

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