services

package
v0.0.0-...-947ddfb Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthCheckError

type HealthCheckError struct {
	Name  string
	Error error
}

type HealthService

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

func NewHealthService

func NewHealthService(stores ...HealthStore) *HealthService

func (*HealthService) Check

func (hs *HealthService) Check() []HealthCheckError

type HealthStore

type HealthStore interface {
	Name() string
	Health() error
}

type IHealthService

type IHealthService interface {
	Check() []HealthCheckError
}

type RoutesService

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

func NewRoutesService

func NewRoutesService(store RoutesStore) *RoutesService

func (*RoutesService) CreateRoute

func (rs *RoutesService) CreateRoute(key string, RedirectURL string, ExtendedURL string) error

func (*RoutesService) DeleteRoute

func (rs *RoutesService) DeleteRoute(key string) error

func (*RoutesService) GetAllRoutes

func (rs *RoutesService) GetAllRoutes() ([]*models.Route, error)

func (*RoutesService) GetRoute

func (rs *RoutesService) GetRoute(key string) (*models.Route, error)

type RoutesStore

type RoutesStore interface {
	Name() string
	Health() error
	GetByKey(key string) (*models.Route, error)
	GetAll() ([]*models.Route, error)
	Put(route *models.Route) error
	Delete(key string) error
	Migrate() error
}

Jump to

Keyboard shortcuts

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