ggst

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v interface{}) ([]byte, error)

func ParseReq

func ParseReq(r *http.Request, v interface{}) error

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

Types

type BufferedResponseWriter

type BufferedResponseWriter struct {
	HttpHeader http.Header
	StatusCode int
	Body       bytes.Buffer
}

BufferedResponseWriter is a wrapper around http.ResponseWriter that buffers the response for later use.

func (*BufferedResponseWriter) Header

func (b *BufferedResponseWriter) Header() http.Header

func (*BufferedResponseWriter) Write

func (b *BufferedResponseWriter) Write(data []byte) (int, error)

func (*BufferedResponseWriter) WriteHeader

func (b *BufferedResponseWriter) WriteHeader(code int)

type Decoder

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

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) Decode

func (dec *Decoder) Decode(v interface{}) error

type Encoder

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

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) Encode

func (dec *Encoder) Encode(v interface{}) error

type Payload

type Payload struct {
	Unk1    int // Unknown, always 0.
	Payload map[string]interface{}
	// contains filtered or unexported fields
}

type RawJSON

type RawJSON map[string]interface{}

func (*RawJSON) DecodeMsgpack

func (J *RawJSON) DecodeMsgpack(dec *msgpack.Decoder) error

func (*RawJSON) EncodeMsgpack

func (J *RawJSON) EncodeMsgpack(enc *msgpack.Encoder) error

type StatGetReqPayload

type StatGetReqPayload struct {
	OtherUserID string // 18 digit User ID of other player. Empty string if self.
	Type        int    // Request type. 1: Vs stats (tension use, RC usage, perfects, etc). 2: Battle Record/Battle Chart. 6: Single player stats (eg mission, story). 7: Levels, Floor, Name, etc.  8: Unknown. 9: News.
	Unk2        int    // Set to -1 normally. Sometimes set to 1 on Type 1 requests.
	Page        int    // Seems to be page number or character ID. -1 if N/A. 0 for first page. Only used by Type 6 and 8.
	Unk3        int    // Set to -1 normally. Sometimes set to -2 on Type 1 requests.
	Unk4        int    // -1
	// contains filtered or unexported fields
}

type StatGetRequest

type StatGetRequest struct {
	Header  StatReqHeader
	Payload StatGetReqPayload
	// contains filtered or unexported fields
}

type StatGetRespHeader

type StatGetRespHeader struct {
	Hash      string // Some sort of incrementing 13 char hash
	Unk1      int    // Unknown, always 0
	Timestamp string // Current time in "YYYY/MM/DD HH:MM:SS" in UTC
	Version1  string // Some version string. "0.1.1" in v1.16. "0.0.7" in v1.10. "0.0.6" in v1.07. "0.0.5" in v1.06, was "0.0.4" in v1.05
	Version2  string // Another version string. Always 0.0.2
	Version3  string // Another version string. Always 0.0.2
	Unk2      string // Unknown, empty string
	Unk3      string // Unknown, empty string
	// contains filtered or unexported fields
}

type StatGetRespPayload

type StatGetRespPayload struct {
	Unk1 int // Unknown, always 0.
	JSON RawJSON
	// contains filtered or unexported fields
}

type StatGetResponse

type StatGetResponse struct {
	Header  StatGetRespHeader
	Payload StatGetRespPayload
	// contains filtered or unexported fields
}

func UnmarshalStatResp

func UnmarshalStatResp(data []byte) (*StatGetResponse, error)

type StatReqHeader

type StatReqHeader struct {
	UserID  string // 18 digit User ID
	Hash    string // 13 character response hash from /api/user/login
	Unk3    int    // Always 2
	Version string // Some version string. Same as ResponseHeader.Version
	Unk4    int    // Always 3
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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