storage

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StorageEngines = map[string]StorageInstanciation{}

StorageEngines lists all Storage implementations declared, with a way to instanciate automatically each.

Functions

func GetStorageEngines

func GetStorageEngines() (se []string)

GetStorageEngines returns all declared Storage implementation.

Types

type ProviderAndDomainStorage added in v0.4.1

type ProviderAndDomainStorage interface {
	provider.ProviderStorage
	domain.DomainStorage
}

type Storage

type Storage interface {
	authuser.AuthUserStorage
	domain.DomainStorage
	domainlog.DomainLogStorage
	insight.InsightStorage
	provider.ProviderStorage
	session.SessionStorage
	user.UserStorage
	zone.ZoneStorage

	// SchemaVersion returns the version of the migration currently in use.
	SchemaVersion() int

	// DoMigration is the first function called.
	MigrateSchema() error

	// Close shutdown the connection with the database and releases all structure.
	Close() error
}

type StorageEngine

type StorageEngine string

StorageEngine defines an interface that handle configuration throught custom flag.

func (*StorageEngine) Set

func (i *StorageEngine) Set(value string) (err error)

func (*StorageEngine) String

func (i *StorageEngine) String() string

type StorageInstanciation

type StorageInstanciation func() (Storage, error)

StorageInstanciation is a function that a Storage implementation has to expose in order to be usable in configuration.

Source Files

  • interface.go
  • singleton.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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