client

package
Version: v0.0.0-...-cea2754 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConflict = errors.New("client: conflict")
	ErrNotFound = errors.New("client: not found")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(baseURI string) *Client

func (*Client) ActivateEmail

func (c *Client) ActivateEmail(address string) error

func (*Client) ActivateUser

func (c *Client) ActivateUser(id int) error

func (*Client) CreateEmail

func (c *Client) CreateEmail(user int, address string) (*schema.Email, error)

func (*Client) CreateRequest

func (c *Client) CreateRequest(fromUser, toUser int) (int, error)

CreateRequest creates a request. The return values are the ID for the created request and an error.

func (*Client) CreateUser

func (c *Client) CreateUser(user *schema.User) (*schema.User, error)

func (*Client) DeleteEmail

func (c *Client) DeleteEmail(address string) error

func (*Client) GetEmail

func (c *Client) GetEmail(address string) (*schema.Email, error)

func (*Client) GetRequestLinkByCode

func (c *Client) GetRequestLinkByCode(code string) (*schema.RequestLink, error)

func (*Client) GetRequestLinkByUser

func (c *Client) GetRequestLinkByUser(user int) (*schema.RequestLink, error)

func (*Client) GetUser

func (c *Client) GetUser(id int) (*schema.User, error)

func (*Client) GetUserEmails

func (c *Client) GetUserEmails(user int) ([]schema.Email, error)

func (*Client) ManageRequest

func (c *Client) ManageRequest(id int, action string) error

func (*Client) SendActivationEmail

func (c *Client) SendActivationEmail(id int) error

func (*Client) SendAuth

func (c *Client) SendAuth(email string) error

func (*Client) SendContactInfoEmail

func (c *Client) SendContactInfoEmail(id int) error

func (*Client) SendEmailActivationEmail

func (c *Client) SendEmailActivationEmail(address string) error

func (*Client) SendRequestEmail

func (c *Client) SendRequestEmail(id int) error

func (*Client) ValidateEmail

func (c *Client) ValidateEmail(address string) (bool, error)

type EmailMessage

type EmailMessage struct {
	From        string `json:"from"`
	To          string `json:"to"`
	Subject     string `json:"subject"`
	Content     string `json:"content"`
	HTMLContent string `json:"htmlContent"`
}

type ServerError

type ServerError int

func (ServerError) Error

func (e ServerError) Error() string

Jump to

Keyboard shortcuts

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