reservation

package
v0.0.0-...-f6fc572 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPNEW string = "New_Reservation"
	OPREM string = "Remove_Reservation"
	OPCHG string = "Update_Reservation"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reservation

type Reservation struct {
	ID    int    `json:"id,omitempty"`
	Date  string `json:"date"`
	Name  string `json:"name"`
	Hour  int    `json:"hour"`
	Party int    `json:"party"`
}

Reservation is the main object of the system

func Decode

func Decode(b []byte) (Reservation, error)

Decode convert array of bytes into a new instance of a reservation.

func (Reservation) Bytes

func (r Reservation) Bytes() ([]byte, error)

Bytes converts a Reservation instance into an array of bytes.

func (Reservation) Print

func (r Reservation) Print()

Print prints a reservation details

Jump to

Keyboard shortcuts

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