storage

package
v0.0.0-...-bb2554f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2016 License: Apache-2.0 Imports: 6 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 UserTable = "users"
View Source
const VolumeTable string = "volumes"

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildStorage

type BuildStorage struct {
	Session *r.Session
	storage.IBuild
}

Service Build type for interface in interfaces folder

func (*BuildStorage) GetByID

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

Get build model by id

func (*BuildStorage) GetByImage

func (s *BuildStorage) GetByImage(user, id string) (*model.BuildList, *e.Err)

Get builds by image

func (*BuildStorage) Insert

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

Insert new build into storage

func (*BuildStorage) Replace

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

Replace build model

type HookStorage

type HookStorage struct {
	Session *r.Session
	storage.IHook
}

Service Build type for interface in interfaces folder

func (*HookStorage) Delete

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

Insert new hook into storage

func (*HookStorage) GetByImage

func (s *HookStorage) GetByImage(user, id string) (*model.HookList, *e.Err)

Get hooks by image

func (*HookStorage) GetByService

func (s *HookStorage) GetByService(user, id string) (*model.HookList, *e.Err)

Get hooks by service

func (*HookStorage) GetByToken

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

Get hooks by image

func (*HookStorage) GetByUser

func (s *HookStorage) GetByUser(id string) (*model.HookList, *e.Err)

Get hooks by image

func (*HookStorage) Insert

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

Insert new hook into storage

type ImageStorage

type ImageStorage struct {
	Session *r.Session
	storage.IImage
}

Project Service type for interface in interfaces folder

func (*ImageStorage) GetByID

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

func (*ImageStorage) GetByProject

func (i *ImageStorage) GetByProject(user, id string) (*model.ImageList, *e.Err)

func (*ImageStorage) GetByService

func (i *ImageStorage) GetByService(user, id string) (*model.ImageList, *e.Err)

func (*ImageStorage) GetByUser

func (i *ImageStorage) GetByUser(id string) (*model.ImageList, *e.Err)

func (*ImageStorage) Insert

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

Insert new image into storage

func (*ImageStorage) Update

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

Update build model

type ProjectStorage

type ProjectStorage struct {
	Session *r.Session
	storage.IProject
}

Project Service type for interface in interfaces folder

func (*ProjectStorage) ExistByName

func (s *ProjectStorage) ExistByName(userID, name string) (bool, error)

func (*ProjectStorage) GetByID

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

func (*ProjectStorage) GetByName

func (s *ProjectStorage) GetByName(user, name string) (*model.Project, *e.Err)

func (*ProjectStorage) GetByUser

func (s *ProjectStorage) GetByUser(id string) (*model.ProjectList, *e.Err)

func (*ProjectStorage) Insert

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

Insert new project into storage

func (*ProjectStorage) Remove

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

Remove build model

func (*ProjectStorage) Update

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

Update build model

type ServiceStorage

type ServiceStorage struct {
	Session *r.Session
	storage.IService
}

Service Service type for interface in interfaces folder

func (*ServiceStorage) CheckExistsByName

func (s *ServiceStorage) CheckExistsByName(userID, projectID, name string) (bool, error)

func (*ServiceStorage) GetByID

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

func (*ServiceStorage) GetByName

func (s *ServiceStorage) GetByName(user, name string) (*model.Service, *e.Err)

func (*ServiceStorage) GetByUser

func (s *ServiceStorage) GetByUser(id string) (*model.ServiceList, *e.Err)

func (*ServiceStorage) Insert

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

Insert new service into storage

func (*ServiceStorage) Remove

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

Remove build model

func (*ServiceStorage) RemoveByProject

func (s *ServiceStorage) RemoveByProject(id string) *e.Err

Remove build model

func (*ServiceStorage) Update

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

Update build model

type Storage

func Get

func Get() (*Storage, error)

func (*Storage) Build

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

func (*Storage) Hook

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

func (*Storage) Image

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

func (*Storage) Project

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

func (*Storage) Service

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

func (*Storage) User

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

func (*Storage) Volume

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

type UserStorage

type UserStorage struct {
	Session *r.Session
	storage.IUser
}

Service User type for interface in interfaces folder

func (*UserStorage) GetByEmail

func (s *UserStorage) GetByEmail(email string) (*model.User, *e.Err)

func (*UserStorage) GetByID

func (s *UserStorage) GetByID(uuid string) (*model.User, *e.Err)

func (*UserStorage) GetByUsername

func (s *UserStorage) GetByUsername(username string) (*model.User, *e.Err)

func (*UserStorage) Insert

func (s *UserStorage) Insert(user *model.User) (*model.User, *e.Err)

type VolumeStorage

type VolumeStorage struct {
	Session *r.Session
	storage.IVolume
}

Volume Service type for interface in interfaces folder

func (*VolumeStorage) GetByID

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

func (*VolumeStorage) GetByProject

func (s *VolumeStorage) GetByProject(id string) (*model.VolumeList, *e.Err)

func (*VolumeStorage) Insert

func (s *VolumeStorage) Insert(volume *model.Volume) (*model.Volume, *e.Err)

Insert new volume into storage

func (*VolumeStorage) Remove

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

Remove build model

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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