cmd

package
v0.0.0-...-581657e Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PORT string
View Source
var SERVER string

Functions

func Execute

func Execute()

func PrettyJSON

func PrettyJSON(data interface{}) (string, error)

PrettyJSON is for pretty printing JSON records

func SliceFromJSON

func SliceFromJSON(slice interface{}, r io.Reader) error

SliceFromJSON decodes a serialized slice with JSON records

func SliceToJSON

func SliceToJSON(slice interface{}, w io.Writer) error

SliceToJSON encodes a slice with JSON records

Types

type User

type User struct {
	ID        int    `json:"id"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	LastLogin int64  `json:"lastlogin"`
	Admin     int    `json:"admin"`
	Active    int    `json:"active"`
}

func (*User) FromJSON

func (p *User) FromJSON(r io.Reader) error

func (*User) ToJSON

func (p *User) ToJSON(w io.Writer) error

Jump to

Keyboard shortcuts

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