storage

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package storage contains methods for interaction with database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewYAML

func NewYAML(ctx context.Context, appFolder string, logger iLogger) (*yamlStorage, error)

NewYAML creates new YAML storage.

Types

type HostStorage

type HostStorage interface {
	GetAll() ([]model.Host, error)
	Get(hostID int) (model.Host, error)
	Save(model.Host) (model.Host, error)
	Delete(id int) error
}

HostStorage defines CRUD operations for Host model.

func Get

func Get(ctx context.Context, appConfig config.Application) (HostStorage, error)

Get returns new data service.

Jump to

Keyboard shortcuts

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