storage

package
v0.0.6-dev Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	SignUp(username, password string, ip net.IP) error
	SignIn(user models.User, ip net.IP) error
	DeleteUser(username string, ip net.IP) error

	Push(username, checksum string, data string, ip net.IP) error
	Pull(username, checksum string, ip net.IP) ([]byte, error)
	Versions(username string, ip net.IP) ([]models.Version, error)
	SaveLog(username, action, checksum string, ip net.IP, date time.Time) error
	GetLog(username string, ip net.IP) ([]models.Action, error)
	ListPGP(username string, ip net.IP) ([]models.PGP, error)
	AddPGP(username, publickey string, confirm bool, ip net.IP) error
	RevokePGP(username, publickey string, ip net.IP) error
	ConfirmPGP(username, publickey string, ip net.IP) error

	Close() error
	Ping() error
}

Storage

func New

func New() (Storage, error)

Directories

Path Synopsis
Package mock_storage is a generated GoMock package.
Package mock_storage is a generated GoMock package.

Jump to

Keyboard shortcuts

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