clients

package module
v0.0.0-...-02f6b5e Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 9 Imported by: 0

README

goa

API Development in Go Using Goa

Generate the boilerplate code. The following command takes the design package import path as an argument. It also accepts the path to the output directory as an optional flag:

goa gen clients/design

generate a basic implementation of the service along with buildable server files that spin up goroutines to start a HTTP server and client files that can make requests to that server:

goa example clients/design

create server and client binaries: go build ./cmd/clients go build ./cmd/clients-cli

run the server: ./clients

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient(client Client) error

CreateClient created a client row in DB

func GetClient

func GetClient(clientID string) (client.ClientManagement, error)

GetClient retrieves one client by its ID

func InitDB

func InitDB() *gorm.DB

InitDB is the function that starts a database file and table structures if not created then returns db object for next functions

func ListClients

func ListClients() (client.ClientManagementCollection, error)

ListClients retrieves the clients stored in Database

func NewSignin

func NewSignin(logger *log.Logger) signin.Service

NewSignin returns the signin service implementation.

Types

type Client

type Client *client.ClientManagement

Jump to

Keyboard shortcuts

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