api

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAPI

type ClientAPI struct {
	DB ClientDatabase
}

The ClientAPI provides handlers for managing Client.

func (*ClientAPI) Add

func (sAPI *ClientAPI) Add(ctx *gin.Context)

Add creates a Client.

func (*ClientAPI) Delete

func (sAPI *ClientAPI) Delete(ctx *gin.Context)

Delete deletes a Client by uid

func (*ClientAPI) Get

func (sAPI *ClientAPI) Get(ctx *gin.Context)

Get returns all the Client

func (*ClientAPI) Update

func (sAPI *ClientAPI) Update(ctx *gin.Context)

Update is updates the Client

type ClientDatabase

type ClientDatabase interface {
	AddClient(lA *model.Client) *model.Client
	CountClient() string
	DeleteClient(uid primitive.ObjectID) error
	GetClient() []*model.Client
	UpdateClient(lA *model.Client) *model.Client
}

The ClientDatabase interface for encapsulating database access.

Jump to

Keyboard shortcuts

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