service

package
v0.0.0-...-1ddd89f Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	ProjectStore project_store.Store
	Config       *system.Config
}

Context holds interfaces of external services

type FindAllRequest

type FindAllRequest struct {
	UserID null.Int `json:"-"`
}

FindAllRequest is a request object for finds all projects

type FindRequest

type FindRequest struct {
	UUID string `json:"uuid" valid:"uuidv4"`
}

FindRequest is a request object for finds project

type Service

type Service interface {
	Find(req *FindRequest) (*model.Project, error)
	FindAll(req *FindAllRequest) ([]*model.Project, error)
	Upload(req *UploadRequest) (*model.Project, error)
}

Service is an interface for authentication

func New

func New(c Context) Service

New creates a new service instance from the context

type UploadRequest

type UploadRequest struct {
	UserID             null.Int  `json:"-"`
	CartfileContent    io.Reader `json:"-"`
	PodfileLockContent io.Reader `json:"-"`
	RepositoryName     string    `json:"repository_name"`
}

UploadRequest holds uploaded files

Jump to

Keyboard shortcuts

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