es01db

package
v0.0.0-...-772f08d Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientKey contextKey = contextKey{Key: 2}

ClientKey ...

View Source
var MoviesKey contextKey = contextKey{Key: 1}

MoviesKey ...

Functions

func GetConnect

func GetConnect(ctx context.Context) (newCtx context.Context)

GetConnect ...

func Insert

func Insert(ctx context.Context, nameIdx, id string, obj interface{})

Update ...

func LoadObjectID

func LoadObjectID(ctx context.Context, nameIdx string, obj interface{})

LoadObjectID ...

func ReadJSONFile

func ReadJSONFile(fName string, data interface{})

ReadJSONFile reads filename fName and unmarshall json to data

func Update

func Update(ctx context.Context, nameIdx, id string, obj interface{})

Update ...

Types

type Address

type Address struct {
	Address string `json:"address"`
	Number  string `json:"number"`
}

type Client

type Client struct {
	ID      string  `json:"id"`
	Name    string  `json:"name"`
	Email   string  `json:"email"`
	Address Address `josn:"client_address"`
	Phone   Phone   `json:"phone"`
}

type Phone

type Phone struct {
	NumType string `json:"num_type"`
	Number  string `json:"number"`
}

Jump to

Keyboard shortcuts

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