rpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package rpc contains all the methods exposed to the rpc interface

Package rpc contains all the methods exposed to the rpc interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RPC

func RPC() http.Handler

RPC returns an http.Handler which will handle the RPC requests

Types

type EnqueueArgs

type EnqueueArgs sender.Mail

EnqueueArgs defines the arguments for the Postmaster.Enqueue endpoint

type EnqueueResult

type EnqueueResult struct {
	Success bool `json:"success"`
}

EnqueueResult defines the response object for the Postmaster.Enqueue endpoint

type Postmaster

type Postmaster struct{}

func (Postmaster) Enqueue

func (_ Postmaster) Enqueue(r *http.Request, args *EnqueueArgs, reply *EnqueueResult) error

Create is an rpc method which creates a Campaign and persists it to disk

func (Postmaster) UpdatePrefs

func (_ Postmaster) UpdatePrefs(r *http.Request, args *UpdatePrefsArgs, reply *UpdatePrefsResult) error

type UpdatePrefsArgs

type UpdatePrefsArgs struct {
	Email string `json:"email" validate:"email,nonzero"`
	Flags int64  `json:"flags" validate:"nonzero"`
}

type UpdatePrefsResult

type UpdatePrefsResult struct {
	Success bool `json:"success"`
}

Jump to

Keyboard shortcuts

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