mock

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegistryService

type RegistryService struct {
	OpenStorageFn   func() error
	CloseStorageFn  func()
	CreateStorageFn func() error
	RemoveStorageFn func() error
	FlushFn         func() error
	CreateEntryFn   func(id, filename string) error
	ReadEntryFn     func(id string) (string, error)
	UpdateEntryFn   func(id, newFilename string) error
	DeleteEntryFn   func(id string) error

	Site midas.Site
}

func NewRegistryService

func NewRegistryService(_ midas.Site) *RegistryService

func (*RegistryService) CloseStorage

func (r *RegistryService) CloseStorage()

func (*RegistryService) CreateEntry

func (r *RegistryService) CreateEntry(id, filename string) error

func (*RegistryService) CreateStorage

func (r *RegistryService) CreateStorage() error

func (*RegistryService) DeleteEntry

func (r *RegistryService) DeleteEntry(id string) error

func (*RegistryService) Flush

func (r *RegistryService) Flush() error

func (*RegistryService) OpenStorage

func (r *RegistryService) OpenStorage() error

func (*RegistryService) ReadEntry

func (r *RegistryService) ReadEntry(id string) (string, error)

func (*RegistryService) RemoveStorage

func (r *RegistryService) RemoveStorage() error

func (*RegistryService) UpdateEntry

func (r *RegistryService) UpdateEntry(id, newFilename string) error

type SiteService

type SiteService struct {
	GetRegistryServiceFn func() (midas.RegistryService, error)
	CreateRegistryFn     func() (string, error)
	BuildSiteFn          func(useCache bool) error
	CreateEntryFn        func(payload midas.Payload) (string, error)
	UpdateEntryFn        func(payload midas.Payload) (string, error)
	DeleteEntryFn        func(payload midas.Payload) (string, error)
}

func NewSiteService

func NewSiteService() *SiteService

func (*SiteService) BuildSite

func (s *SiteService) BuildSite(useCache bool) error

func (*SiteService) CreateEntry

func (s *SiteService) CreateEntry(payload midas.Payload) (string, error)

func (*SiteService) DeleteEntry

func (s *SiteService) DeleteEntry(payload midas.Payload) (string, error)

func (*SiteService) GetRegistryService

func (s *SiteService) GetRegistryService() (midas.RegistryService, error)

func (*SiteService) UpdateEntry

func (s *SiteService) UpdateEntry(payload midas.Payload) (string, error)

Jump to

Keyboard shortcuts

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