mock

package
v0.0.0-...-6151759 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: GPL-2.0, GPL-3.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 AddressService

type AddressService struct {
	SearchCityFn      func(query string) (*lara.CityStreetList, error)
	SearchCityInvoked bool

	SearchStreetForCityFn      func(cityID uint64, query string) (*lara.CityStreetList, error)
	SearchStreetForCityInvoked bool
}

AddressService is mock implementation of lara.AddressService

func (*AddressService) SearchCity

func (s *AddressService) SearchCity(ctx context.Context, query string) (*lara.CityStreetList, error)

SearchCity mock implementation

func (*AddressService) SearchStreetForCity

func (s *AddressService) SearchStreetForCity(ctx context.Context, cityID uint64, query string) (*lara.CityStreetList, error)

SearchStreetForCity mock implementation

type OwnerService

type OwnerService struct {
	GetFn      func(id uint64) (*lara.GetOwner, error)
	GetInvoked bool

	UpdateFn      func(id uint64, o *lara.UpdateOwner) error
	UpdateInvoked bool

	CreateFn      func(o *lara.CreateOwner) (uint64, error)
	CreateInvoked bool
}

OwnerService is mock implementation of lara.OwnerService

func (*OwnerService) Create

func (s *OwnerService) Create(ctx context.Context, o *lara.CreateOwner) (uint64, error)

Create mock implementation

func (*OwnerService) Get

func (s *OwnerService) Get(ctx context.Context, id uint64) (*lara.GetOwner, error)

Get mock implementation

func (*OwnerService) Update

func (s *OwnerService) Update(ctx context.Context, id uint64, o *lara.UpdateOwner) error

Update mock implementation

type PatientService

type PatientService struct {
	GetFn      func(id uint64) (*lara.GetPatient, error)
	GetInvoked bool

	UpdateFn      func(id uint64, p *lara.UpdatePatient) error
	UpdateInvoked bool

	CreateFn      func(r *lara.CreatePatient) (uint64, error)
	CreateInvoked bool
}

PatientService is mock implementation of lara.PatientService

func (*PatientService) Create

Create mock implementation

func (*PatientService) Get

Get mock implementation

func (*PatientService) Update

func (s *PatientService) Update(ctx context.Context, id uint64, p *lara.UpdatePatient) error

Update mock implementation

type ProductService

type ProductService struct {
	SearchFn func(p *lara.ProductSearchRequest) (*lara.ProductSearchResult,
		error)
	SearchInvoked bool
}

ProductService mock implementation of lara.ProductService

func (*ProductService) Search

Search mock implementation

type RecordService

type RecordService struct {
	GetFn      func(id uint64) (*lara.GetRecord, error)
	GetInvoked bool

	CreateFn      func(r *lara.CreateRecord) (uint64, error)
	CreateInvoked bool

	UpdateFn      func(id uint64, r *lara.UpdateRecord) error
	UpdateInvoked bool
}

RecordService is mock implementation of lara.RecordService

func (*RecordService) Create

func (s *RecordService) Create(ctx context.Context, r *lara.CreateRecord) (uint64, error)

Create mock implementation

func (*RecordService) Get

func (s *RecordService) Get(ctx context.Context, id uint64) (*lara.GetRecord, error)

Get mock implementation

func (*RecordService) Update

func (s *RecordService) Update(ctx context.Context, id uint64, r *lara.UpdateRecord) error

Update mock implementation

type ReportService

type ReportService struct {
	GetIncomeStatisticsFn func(
		r *lara.ReportRequest) (*lara.IncomeStatistics, error)
	GetIncomeStatisticsInvoked bool
}

ReportService is mock implementation of lara.ReportService

func (*ReportService) GetIncomeStatistics

func (s *ReportService) GetIncomeStatistics(ctx context.Context,
	r *lara.ReportRequest) (*lara.IncomeStatistics, error)

GetIncomeStatistics mock implementation

type SearchService

type SearchService struct {
	SearchFn        func(q string) (*lara.SearchResult, error)
	SearchFnInvoked bool
}

SearchService is mock implementation of lara.SearchService

func (*SearchService) Search

func (s *SearchService) Search(ctx context.Context, q string) (*lara.SearchResult, error)

Search mock implementation

type SimpleLovService

type SimpleLovService struct {
	GetAllTitlesFn      func() (*lara.LOVItemList, error)
	GetAllTitlesInvoked bool

	GetAllUnitsFn      func() (*lara.LOVItemList, error)
	GetAllUnitsInvoked bool

	GetAllGendersFn      func() (*lara.LOVItemList, error)
	GetAllGendersInvoked bool

	GetAllSpeciesFn      func() (*lara.LOVItemList, error)
	GetAllSpeciesInvoked bool

	GetAllBreedsFn      func(speciesId uint64) (*lara.LOVItemList, error)
	GetAllBreedsInvoked bool
}

SimpleLovService is mock implementation of lara.TitleService, lara.UnitService, lara.GenderService, lara.SpeciesService, lara.BreedService

func (*SimpleLovService) GetAllBreedsBySpecies

func (s *SimpleLovService) GetAllBreedsBySpecies(ctx context.Context, speciesID uint64) (*lara.LOVItemList, error)

GetAllBreedsBySpecies mock implementation

func (*SimpleLovService) GetAllGenders

func (s *SimpleLovService) GetAllGenders(ctx context.Context) (*lara.LOVItemList, error)

GetAllGenders mock implementation

func (*SimpleLovService) GetAllSpecies

func (s *SimpleLovService) GetAllSpecies(ctx context.Context) (*lara.LOVItemList, error)

GetAllSpecies mock implementation

func (*SimpleLovService) GetAllTitles

func (s *SimpleLovService) GetAllTitles(ctx context.Context) (*lara.LOVItemList, error)

GetAllTitles mock implementation

func (*SimpleLovService) GetAllUnits

func (s *SimpleLovService) GetAllUnits(ctx context.Context) (*lara.LOVItemList, error)

GetAllUnits mock implementation

type TagService

type TagService struct {
	GetFn      func(id uint64) (*lara.GetTag, error)
	GetInvoked bool

	UpdateFn      func(id uint64, t *lara.UpdateTag) error
	UpdateInvoked bool

	CreateFn      func(t *lara.CreateTag) (uint64, error)
	CreateInvoked bool

	GetPatientByTagFn      func(tagValue string) (*lara.PatientByTag, error)
	GetPatientByTagInvoked bool
}

TagService is mock implementation of lara.TagService

func (*TagService) Create

func (s *TagService) Create(ctx context.Context, t *lara.CreateTag) (uint64, error)

Create mock implementation

func (*TagService) Get

func (s *TagService) Get(ctx context.Context, id uint64) (*lara.GetTag, error)

Get mock implementation

func (*TagService) GetPatientByTag

func (s *TagService) GetPatientByTag(ctx context.Context, tagValue string) (*lara.PatientByTag, error)

GetPatientByTag mock implementation

func (*TagService) Update

func (s *TagService) Update(ctx context.Context, id uint64, t *lara.UpdateTag) error

Update mock implementation

type UserService

type UserService struct {
	AuthenticateFn      func(login, password string) (*lara.User, error)
	AuthenticateInvoked bool

	RegisterFn     func(login, password string, permissions []lara.PermissionType) error
	RegiserInvoked bool
}

UserService is mock implementation of lara.UserService

func (*UserService) Authenticate

func (s *UserService) Authenticate(ctx context.Context, login, password string) (*lara.User, error)

Authenticate mock implementation

func (*UserService) Grant

func (s *UserService) Grant(ctx context.Context, login string, permissions []lara.PermissionType) error

Grant mock implementation

func (*UserService) Register

func (s *UserService) Register(ctx context.Context, login, password string, permissions []lara.PermissionType) error

Register mock implementation

func (*UserService) Revoke

func (s *UserService) Revoke(ctx context.Context, login string, permissions []lara.PermissionType) error

Revoke mock implementation

Jump to

Keyboard shortcuts

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