store

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExists = errors.New("host rules already exists")

ErrExists is error when HostRules already exists

View Source
var ErrNotFound = errors.New("host rules not found")

ErrNotFound is error for HostRules not found

Functions

This section is empty.

Types

type Store

type Store interface {
	// ListHostRules return list of models.HostRules or error
	ListHostRules() ([]models.HostRules, error)
	// GetHostRules return HostRules by Host if it exists.
	// Or return nil if Host not exists. Otherwise return error.
	GetHostRules(string) (*models.HostRules, error)
	// CreateHostRule create HostRule if it not exists
	CreateHostRules(models.HostRules) error
	// UpdateHostRules update HostRules if it exists
	UpdateHostRules(host string, hostRules models.HostRules) error
	// DeleteHostRules delete HostRules if it exists
	DeleteHostRules(host string) error
	// Check health status. If health is OK, then should return nil.
	// Otherwise return error.
	CheckHealth() error
}

Store is interface for stores

Jump to

Keyboard shortcuts

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