storage

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(file string) error

Types

type Option

type Option func(options *options)

func WithFrom

func WithFrom(from int64) Option

func WithLimit

func WithLimit(limit int) Option

func WithRequests

func WithRequests() Option

func WithTo

func WithTo(to int64) Option

type Storage

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

func NewStorage

func NewStorage(file string) (*Storage, error)

func (*Storage) DeleteLoader

func (s *Storage) DeleteLoader(ID string) error

func (*Storage) DeleteLoaderTag

func (s *Storage) DeleteLoaderTag(loaderUUID string, tags []*model.LoaderTag) (err error)

func (*Storage) DeleteTemplate added in v1.2.0

func (s *Storage) DeleteTemplate(name string) error

func (*Storage) GetLoaderByDescription

func (s *Storage) GetLoaderByDescription(description string) ([]*model.Loader, error)

func (*Storage) GetLoaderByID

func (s *Storage) GetLoaderByID(loaderUUID string) (*model.Loader, error)

func (*Storage) GetLoaderByName

func (s *Storage) GetLoaderByName(name string) ([]*model.Loader, error)

func (*Storage) GetLoaderByTags

func (s *Storage) GetLoaderByTags(tags []*model.LoaderTag) ([]*model.Loader, error)

func (*Storage) GetLoaderTags

func (s *Storage) GetLoaderTags(loaderUUID string) ([]*model.LoaderTag, error)

func (*Storage) GetLoaderTagsByKey

func (s *Storage) GetLoaderTagsByKey(key string) (map[string]*model.LoaderTag, error)

func (*Storage) GetLoaders

func (s *Storage) GetLoaders(limit int) ([]*model.Loader, error)

func (*Storage) GetLoadersByRange

func (s *Storage) GetLoadersByRange(from, to int64, limit int) ([]*model.Loader, error)

func (*Storage) GetSummaries

func (s *Storage) GetSummaries(loaderConfUUID string, opts ...Option) ([]*model.Summary, error)

func (*Storage) GetTemplateByName added in v1.2.0

func (s *Storage) GetTemplateByName(name string) (*model.Template, error)

func (*Storage) GetTemplates added in v1.2.0

func (s *Storage) GetTemplates(limit int) ([]*model.Template, error)

func (*Storage) InsertLoaderConfiguration

func (s *Storage) InsertLoaderConfiguration(loaderConfiguration *model.Loader) (uuid string, err error)

InsertLoaderConfiguration method is saving Loader structure in the database It will create parameters and headers in separate tables

func (*Storage) InsertLoaderConfigurationTags

func (s *Storage) InsertLoaderConfigurationTags(loaderConfUUID string, loaderConfigurationTags []*model.LoaderTag) (err error)

func (*Storage) InsertSummary

func (s *Storage) InsertSummary(optsUUID string, summary *model.Summary, saveRequests, saveAggRequests bool) (uuid string, err error)

func (*Storage) InsertTemplate added in v1.2.0

func (s *Storage) InsertTemplate(name, content string) error

func (*Storage) UpdateLoaderTag added in v1.3.0

func (s *Storage) UpdateLoaderTag(loaderUUID string, key, value string) error

func (*Storage) UpdateTemplate added in v1.2.0

func (s *Storage) UpdateTemplate(name, content string) error

type StorageError

type StorageError struct {
	Err           error
	RollbackError error
}

func (StorageError) Error

func (s StorageError) Error() string

Jump to

Keyboard shortcuts

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