mock

package
v0.0.0-...-4d56773 Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainHandler

type DomainHandler struct {
	CreateDomainRedirectionFn   func(subDomain string, dest string) error
	CreateDomainRedirectionCall int

	SyncFn   func() ([]*cochonou.Redirection, error)
	SyncCall int
}

func (*DomainHandler) CreateDomainRedirection

func (h *DomainHandler) CreateDomainRedirection(subDomain, dest string) error

func (*DomainHandler) Sync

func (h *DomainHandler) Sync() ([]*cochonou.Redirection, error)

type RedirectionStore

type RedirectionStore struct {
	SaveFn   func(redir *cochonou.Redirection) error
	SaveCall int

	GetBySubDomainFn   func(string) (*cochonou.Redirection, error)
	GetBySubDomainCall int

	GetAllFn   func() ([]*cochonou.Redirection, error)
	GetAllCall int
}

func (*RedirectionStore) GetAll

func (s *RedirectionStore) GetAll() ([]*cochonou.Redirection, error)

func (*RedirectionStore) GetBySubDomain

func (s *RedirectionStore) GetBySubDomain(subdomain string) (*cochonou.Redirection, error)

func (*RedirectionStore) Save

func (s *RedirectionStore) Save(redir *cochonou.Redirection) error

Jump to

Keyboard shortcuts

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