db

package
v0.0.0-...-b335a3f Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	Orderid     string    `json:"order_id"`
	Description string    `json:"description"`
	Created     time.Time `json:"created"`
}

Order -

type RowsAffected

type RowsAffected struct {
	RowsAffected int64
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func InitDatabase

func InitDatabase() *Server

InitDatabase - sets database connection configuration

func (*Server) AddOrder

func (s *Server) AddOrder(order_id string, description string) ([]Order, error)

func (*Server) DeleteOrder

func (s *Server) DeleteOrder(order_id string) (RowsAffected, error)

func (*Server) EditOrder

func (s *Server) EditOrder(order_id string, description string) (RowsAffected, error)

func (*Server) GetOrder

func (s *Server) GetOrder(order_id string) ([]Order, error)

func (*Server) GetOrders

func (s *Server) GetOrders() ([]Order, error)

Jump to

Keyboard shortcuts

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