// 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 synchronization func 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 }