mock

package
v0.0.0-...-fe4f5a4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BuildTable string = "builds"
View Source
const HookTable string = "hooks"
View Source
const ImageTable string = "images"
View Source
const ProjectTable string = "projects"
View Source
const ServiceTable string = "services"
View Source
const VolumeTable string = "volumes"

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildMock

type BuildMock struct {
	Mock *r.Mock
	storage.IBuild
}

Service Build type for interface in interfaces folder

func (*BuildMock) GetByID

func (s *BuildMock) GetByID(user, id string) (*model.Build, *e.Err)

Get build model by id

func (*BuildMock) Insert

func (s *BuildMock) Insert(build *model.Build) (*model.Build, *e.Err)

Insert new build into storage

func (*BuildMock) ListByImage

func (s *BuildMock) ListByImage(user, id string) (*model.BuildList, *e.Err)

Get builds by image

func (*BuildMock) Replace

func (s *BuildMock) Replace(build *model.Build) (*model.Build, *e.Err)

Replace build model

type HookMock

type HookMock struct {
	Mock *r.Mock
	storage.IHook
}

Service Build type for interface in interfaces folder

func (*HookMock) Delete

func (s *HookMock) Delete(user, id string) *e.Err

Insert new hook into storage

func (*HookMock) GetByToken

func (s *HookMock) GetByToken(token string) (*model.Hook, *e.Err)

Get hooks by image

func (*HookMock) Insert

func (s *HookMock) Insert(hook *model.Hook) (*model.Hook, *e.Err)

Insert new hook into storage

func (*HookMock) ListByImage

func (s *HookMock) ListByImage(user, id string) (*model.HookList, *e.Err)

Get hooks by image

func (*HookMock) ListByService

func (s *HookMock) ListByService(user, id string) (*model.HookList, *e.Err)

Get hooks by service

func (*HookMock) ListByUser

func (s *HookMock) ListByUser(id string) (*model.HookList, *e.Err)

Get hooks by image

type ImageMock

type ImageMock struct {
	Mock *r.Mock
	storage.IImage
}

Project Service type for interface in interfaces folder

func (*ImageMock) GetByID

func (i *ImageMock) GetByID(user, id string) (*model.Image, *e.Err)

func (*ImageMock) Insert

func (i *ImageMock) Insert(image *model.Image) (*model.Image, *e.Err)

Insert new image into storage

func (*ImageMock) ListByProject

func (i *ImageMock) ListByProject(user, id string) (*model.ImageList, *e.Err)

func (*ImageMock) ListByService

func (i *ImageMock) ListByService(user, id string) (*model.ImageList, *e.Err)

func (*ImageMock) ListByUser

func (i *ImageMock) ListByUser(id string) (*model.ImageList, *e.Err)

func (*ImageMock) Update

func (i *ImageMock) Update(image *model.Image) (*model.Image, *e.Err)

Update image model

type Mock

func Get

func Get() (*Mock, error)

func (*Mock) Build

func (s *Mock) Build() storage.IBuild

func (*Mock) Hook

func (s *Mock) Hook() storage.IHook

func (*Mock) Image

func (s *Mock) Image() storage.IImage

func (*Mock) Project

func (s *Mock) Project() storage.IProject

func (*Mock) Service

func (s *Mock) Service() storage.IService

func (*Mock) User

func (s *Mock) User() storage.IUser

func (*Mock) Volume

func (s *Mock) Volume() storage.IVolume

type ProjectMock

type ProjectMock struct {
	Mock *r.Mock
	storage.IProject
}

Project Service type for interface in interfaces folder

func (*ProjectMock) GetByID

func (s *ProjectMock) GetByID(user, id string) (*model.Project, *e.Err)

func (*ProjectMock) GetByNameOrID

func (s *ProjectMock) GetByNameOrID(user, nameOrID string) (*model.Project, *e.Err)

func (*ProjectMock) Insert

func (s *ProjectMock) Insert(project *model.Project) (*model.Project, *e.Err)

Insert new project into storage

func (*ProjectMock) ListByUser

func (s *ProjectMock) ListByUser(user string) (*model.ProjectList, *e.Err)

func (*ProjectMock) Remove

func (s *ProjectMock) Remove(user, id string) *e.Err

Remove project model

func (*ProjectMock) Update

func (s *ProjectMock) Update(project *model.Project) (*model.Project, *e.Err)

Update project model

type ServiceMock

type ServiceMock struct {
	Mock *r.Mock
	storage.IService
}

Service Service type for interface in interfaces folder

func (*ServiceMock) GetByID

func (s *ServiceMock) GetByID(user, project, id string) (*model.Service, *e.Err)

func (*ServiceMock) GetByNameOrID

func (s *ServiceMock) GetByNameOrID(user, project, nameOrID string) (*model.Service, *e.Err)

func (*ServiceMock) Insert

func (s *ServiceMock) Insert(service *model.Service) (*model.Service, *e.Err)

Insert new service into storage

func (*ServiceMock) ListByProject

func (s *ServiceMock) ListByProject(user, project string) (*model.ServiceList, *e.Err)

func (*ServiceMock) Remove

func (s *ServiceMock) Remove(user, project, id string) *e.Err

Remove service model

func (*ServiceMock) RemoveByProject

func (s *ServiceMock) RemoveByProject(user, project string) *e.Err

Remove service model

func (*ServiceMock) Update

func (s *ServiceMock) Update(service *model.Service) (*model.Service, *e.Err)

Update service model

type UserMock

type UserMock struct {
	Mock *r.Mock
	storage.IUser
}

Service User type for interface in interfaces folder

func (*UserMock) GetByEmail

func (u *UserMock) GetByEmail(_ string) (*model.User, *e.Err)

func (*UserMock) GetByID

func (u *UserMock) GetByID(_ string) (*model.User, *e.Err)

func (*UserMock) GetByUsername

func (u *UserMock) GetByUsername(_ string) (*model.User, *e.Err)

func (*UserMock) Insert

func (u *UserMock) Insert(_ *model.User) (*model.User, *e.Err)

type VolumeMock

type VolumeMock struct {
	Mock *r.Mock
	storage.IVolume
}

Volume Service type for interface in interfaces folder

func (*VolumeMock) GetByID

func (s *VolumeMock) GetByID(user, id string) (*model.Volume, *e.Err)

func (*VolumeMock) Insert

func (s *VolumeMock) Insert(project *model.Volume) (*model.Volume, *e.Err)

Insert new volume into storage

func (*VolumeMock) ListByProject

func (s *VolumeMock) ListByProject(id string) (*model.VolumeList, *e.Err)

func (*VolumeMock) Remove

func (s *VolumeMock) Remove(id string) *e.Err

Remove volume model

Jump to

Keyboard shortcuts

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