Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.4 kB · 51 lines
Go
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152// Code generated by glex; DO NOT EDIT.
// Lexicon schema: place.stream.server.getServerTime
package placestream
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type ServerGetServerTime_Output struct { LexiconTypeID string `json:"$type,omitempty"` // serverTime: Current server time in RFC3339 format ServerTime string `json:"serverTime"`}
// RecordTypeID implements glex.Record.func (t *ServerGetServerTime_Output) RecordTypeID() string { return "place.stream.server.getServerTime"}
func (t *ServerGetServerTime_Output) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "place.stream.server.getServerTime" return glex.MarshalCBOR(w, &cp)}
func (t *ServerGetServerTime_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ServerGetServerTime calls the XRPC method "place.stream.server.getServerTime".//// Get the current server time for client clock synchronizationfunc ServerGetServerTime(ctx context.Context, c glex.LexClient) (*ServerGetServerTime_Output, error) { var out ServerGetServerTime_Output
if err := c.LexDo(ctx, glex.Query, "", "place.stream.server.getServerTime", nil, nil, &out); err != nil { return nil, err } return &out, nil}