client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package client package sets up clients for calling the APIs in this app approach largely taken from Marcus Olsson

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserClient

type UserClient struct {
	BaseURL   *url.URL
	UserAgent string

	HTTPClient *http.Client
}

UserClient struct type holds the information about the REST API we are going to consume

func (*UserClient) Create

func (c *UserClient) Create(ctx context.Context, body *appUser.User) (*appUser.User, error)

Create method sets up the request, then calls the do method of said request

and returns the appUser.User returned in the response body

Jump to

Keyboard shortcuts

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