storage

package
v0.0.0-...-915d5cb Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RelayStatisticBucket = "relay_statistic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStorage

func NewStorage(path string) Storage

func (Storage) AddRelayStatistic

func (s Storage) AddRelayStatistic(id string, success bool, offline bool, ms int, bytes int64)

func (Storage) GetAdminPassword

func (s Storage) GetAdminPassword() (string, error)

func (Storage) GetAdminSalt

func (s Storage) GetAdminSalt() ([]byte, error)

func (Storage) GetHistoryStatistic

func (s Storage) GetHistoryStatistic(page, pageSize int, sortBy string, sortType string) ([]*model.RelayStatistic, int64, error)

func (Storage) GetHistoryStatisticByID

func (s Storage) GetHistoryStatisticByID(id string) (*model.RelayStatistic, error)

func (Storage) GetKeyValue

func (s Storage) GetKeyValue(key string) (string, error)

func (Storage) GetRelayStatistic

func (s Storage) GetRelayStatistic(id string) (*model.RelayStatistic, error)

func (Storage) IncrementRelayOfflineCount

func (s Storage) IncrementRelayOfflineCount(id string)

func (Storage) SetAdminPassword

func (s Storage) SetAdminPassword(password string) error

func (Storage) SetAdminSalt

func (s Storage) SetAdminSalt(salt []byte) error

func (Storage) SetKeyValue

func (s Storage) SetKeyValue(key string, value string) error

func (Storage) UpdateConnectionCustomName

func (s Storage) UpdateConnectionCustomName(id string, customName string) error

Directories

Path Synopsis
acl

Jump to

Keyboard shortcuts

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