json_struct

package
v1.0.92 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code struct {
	Code      int         `json:"code"`
	Msg       string      `json:"msg"`
	Data      interface{} `json:"data"`
	Timestamp int64       `json:"timestamp"`
}

func (*Code) Set

func (json *Code) Set(status int, msg string, data interface{}, timestamp int64)

type Default

type Default struct {
	Status    int         `json:"status"`
	Msg       string      `json:"msg"`
	Data      interface{} `json:"data"`
	Timestamp int64       `json:"timestamp"`
}

func (*Default) Set

func (json *Default) Set(status int, msg string, data interface{}, timestamp int64)

type Message

type Message struct {
	Status    int         `json:"status"`
	Msg       string      `json:"message"`
	Data      interface{} `json:"data"`
	Timestamp int64       `json:"timestamp"`
}

func (*Message) Set

func (json *Message) Set(status int, msg string, data interface{}, timestamp int64)

type Raw added in v1.0.89

type Raw struct {
	Data interface{} `json:"data"`
}

func (*Raw) MarshalJSON added in v1.0.89

func (r *Raw) MarshalJSON() ([]byte, error)

func (*Raw) Set added in v1.0.89

func (json *Raw) Set(status int, msg string, data interface{}, timestamp int64)

Jump to

Keyboard shortcuts

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