pantry

package module
v0.0.0-...-6a5ecba Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: MIT Imports: 0 Imported by: 0

README

pantry

manage food inventory

Synopsis

pantry
pantry <command>
pantry -version
inventory
pantry inventory create -name <name>
pantry inventory update -id <id> -name <name>
pantry inventory delete -id <id>
pantry inventory get -id <id>
pantry inventory list

pantry inventory add-item -inventory-id <id> -name <name> -quantity <quantity> -unit <unit>
pantry inventory edit-item -inventory-id <id> -item-id <id> -name <name> -quantity <quantity> -unit <unit>
pantry inventory remove-item -inventory-id <id> -item-id <id>
pantry inventory get-item -inventory-id <id> -item-id <id>
pantry inventory list-items -inventory-id <id>
pantry-grpc
pantry-grpc -host <host> -port <port>
pantry-grpc -version

Description

Options

pantry
-version
    print version number
inventory
create
-name
    inventory name
update
-id
    inventory id

-name
    inventory name
delete
-id
    inventory id
get
-id
    inventory id
list
add-item
-inventory-id
    inventory id

-name
    item name

-quantity
    item quantity

-unit
    unit of item quantity
edit-item
-inventory-id
    inventory id

-item-id
    item id

-name
    item name

-quantity
    item quantity (value)

-unit
    item quantity (unit)
remove-item
-inventory-id
    inventory id

-item-id
    item id
get-item
-inventory-id
    inventory id

-item-id
    item id
list-items
-inventory-id
    inventory id
pantry-grpc
-host
    host address (default: localhost)

-port
    port number (default: 50051)

-version
    print version number

Environment Variables

pantry
PANTRY_GRPC_TARGET
    gRPC target name (e.g. localhost:50051)

Examples

# pantry-grpc
$ pantry-grpc

# pantry
$ export PANTRY_GRPC_TARGET=localhost:50051
$ pantry inventory create -name foo
88a81b58-9ab9-43bc-afa7-a4eda7cea565

$ pantry inventory update -id 88a81b58-9ab9-43bc-afa7-a4eda7cea565 -name bar
88a81b58-9ab9-43bc-afa7-a4eda7cea565

$ pantry inventory list
88a81b58-9ab9-43bc-afa7-a4eda7cea565	bar

$ pantry inventory delete -id 88a81b58-9ab9-43bc-afa7-a4eda7cea565
$

Installation

pantry
go get github.com/junary/pantry-go/cmd/pantry
pantry-grpc
go get github.com/junary/pantry-go/cmd/pantry-grpc

See Also

Documentation

Index

Constants

View Source
const Version = "v0.1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Run(args []string) int
}

Directories

Path Synopsis
cmd
pantry command
pantry-grpc command
pantry

Jump to

Keyboard shortcuts

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