api

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingContent indicates an inexistent user.
	ErrMissingUser = restful.NewError(http.StatusConflict, "Missing user")
	// ErrMissingUserId indicates an user without an id.
	ErrMissingUserId = restful.NewError(http.StatusUnprocessableEntity, "No user id given")
	// ErrMissingUserPassword indicates an user without a password.
	ErrMissingUserPassword = restful.NewError(http.StatusUnprocessableEntity, "No user password given.")
	// ErrUserAlreadyExist indicates an existing user that should not be.
	ErrUserAlreadyExist = restful.NewError(http.StatusConflict, "User already exist")
	//ErrPatchFail indicates the json-patch update fails.
	ErrPatchFail = restful.NewError(http.StatusConflict, "Patch update fails")
)

Functions

This section is empty.

Types

type CompanionAPI

type CompanionAPI struct {
	Client backend.Client
}

CompanionAPI registering with restful

func (*CompanionAPI) Register

func (cApi *CompanionAPI) Register() *restful.WebService

Register provide a restful.WebService from this API

type CreateUserReq

type CreateUserReq struct {
	ID   string           `json:"id"`
	User backend.UserData `json:"user"`
}

CreateUserReq is a request to create a new UserData

Jump to

Keyboard shortcuts

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