payment

package
v0.0.0-...-6740b9f Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2014 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocationPath = "http://api.tripmoneymgmt.com/manager/overviews"
)

Variables

View Source
var (
	ErrPaymentUnauthorized error = fmt.Errorf("payment: Unauthorized access")
)

Functions

func Delete

func Delete(url *url.URL, header http.Header, _ interface{}, requestContext *h.RequestContext) (int, http.Header, interface{}, error)

func Get

func Get(url *url.URL, header http.Header, _ interface{}, requestContext *h.RequestContext) (int, http.Header, *t.Payment, error)

func GetComments

func GetComments(url *url.URL, header http.Header, _ interface{}, requestContext *h.RequestContext) (int, http.Header, t.Comments, error)

func GetDocuments

func GetDocuments(url *url.URL, header http.Header, _ interface{}, requestContext *h.RequestContext) (int, http.Header, t.Documents, error)

func Patch

func Patch(url *url.URL, header http.Header, payment *t.Payment, requestContext *h.RequestContext) (int, http.Header, *t.Payment, error)

func PostComments

func PostComments(url *url.URL, header http.Header, comment *t.Comment, requestContext *h.RequestContext) (int, http.Header, *t.Comment, error)

func PostDocuments

func PostDocuments(url *url.URL, header http.Header, requestContext *h.RequestContext) (int, http.Header, interface{}, error)

func Put

func Put(url *url.URL, header http.Header, payment *t.Payment, requestContext *h.RequestContext) (int, http.Header, *t.Payment, error)

Types

type Controller

type Controller struct {
	AppEngineContext appengine.Context
	RequestContext   *h.RequestContext
	// contains filtered or unexported fields
}

func NewController

func NewController(RequestContext *h.RequestContext) *Controller

func (*Controller) Delete

func (self *Controller) Delete(url *url.URL) error

func (*Controller) Get

func (self *Controller) Get(url *url.URL) (t.Payment, error)

func (*Controller) GetComments

func (self *Controller) GetComments(url *url.URL) (t.Comments, error)

func (*Controller) GetDocuments

func (self *Controller) GetDocuments(url *url.URL) (t.Documents, error)

func (*Controller) Patch

func (self *Controller) Patch(url *url.URL, payment *t.Payment) error

func (*Controller) PostComment

func (self *Controller) PostComment(comment *t.Comment) error

func (*Controller) PostDocuments

func (self *Controller) PostDocuments(url *url.URL) error

func (*Controller) Put

func (self *Controller) Put(url *url.URL, payment *t.Payment) error

type Notificator

type Notificator struct {
	AppEngineContext appengine.Context
	RequestContext   *h.RequestContext
}

func NewNotificator

func NewNotificator(RequestContext *h.RequestContext) *Notificator

func (*Notificator) Create

func (self *Notificator) Create(payment *t.Payment) error

func (*Notificator) CreateComment

func (self *Notificator) CreateComment(comment *t.Comment) error

func (*Notificator) Update

func (self *Notificator) Update(payment *t.Payment) error

type Service

type Service struct {
	AppEngineContext appengine.Context
	RequestContext   *h.RequestContext

	Overviews *o.Overviews
	Payments  *p.Payments
	Documents *d.Documents
	Comments  *c.Comments
	// contains filtered or unexported fields
}

func NewService

func NewService(RequestContext *h.RequestContext) *Service

func (*Service) CreateComment

func (self *Service) CreateComment(comment *t.Comment, id t.PaymentId, user *t.User) error

func (*Service) CreateDocument

func (self *Service) CreateDocument(part *multipart.Part, id t.PaymentId, user *t.User) error

func (*Service) Delete

func (self *Service) Delete(id t.PaymentId, user *t.User) error

func (*Service) Find

func (self *Service) Find(id t.PaymentId, user *t.User) (t.Payment, error)

func (*Service) FindAllComments

func (self *Service) FindAllComments(id t.PaymentId, user *t.User) (t.Comments, error)

func (*Service) FindAllDocuments

func (self *Service) FindAllDocuments(id t.PaymentId, user *t.User) (t.Documents, error)

func (*Service) Patch

func (self *Service) Patch(payment *t.Payment, fields []string, user *t.User) error

func (*Service) Update

func (self *Service) Update(payment *t.Payment, user *t.User) error

type Validator

type Validator struct {
	AppEngineContext appengine.Context
	RequestContext   *h.RequestContext
}

func NewValidator

func NewValidator(RequestContext *h.RequestContext) *Validator

func (*Validator) Create

func (self *Validator) Create(payment *t.Payment) error

func (*Validator) CreateComment

func (self *Validator) CreateComment(comment *t.Comment) error

func (*Validator) CreateDocument

func (self *Validator) CreateDocument(part *multipart.Part) error

func (*Validator) Patch

func (self *Validator) Patch(payment *t.Payment, fields []string) error

func (*Validator) Update

func (self *Validator) Update(payment *t.Payment) error

Jump to

Keyboard shortcuts

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