api

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) GetServer

func (c *Client) GetServer(ctx context.Context, params GetServerParams) (GetServerRes, error)

GetServer invokes getServer operation.

Get server by host.

GET /multiplayer/{multiplayerName}/server/{serverHost}

func (*Client) ListMultiplayerSummaries

func (c *Client) ListMultiplayerSummaries(ctx context.Context, params ListMultiplayerSummariesParams) ([]MultiplayerSummary, error)

ListMultiplayerSummaries invokes listMultiplayerSummaries operation.

Get a summary of multiplayer platforms.

GET /multiplayers/summaries

func (*Client) ListServerStatistics

func (c *Client) ListServerStatistics(ctx context.Context, params ListServerStatisticsParams) (ListServerStatisticsRes, error)

ListServerStatistics invokes listServerStatistics operation.

Get server statistics by host.

GET /multiplayer/{multiplayerName}/server/{serverHost}/statistics

func (*Client) ListServerSummaries

func (c *Client) ListServerSummaries(ctx context.Context, params ListServerSummariesParams) (ListServerSummariesRes, error)

ListServerSummaries invokes listServerSummaries operation.

List servers for a multiplayer platform.

GET /multiplayer/{multiplayerName}/servers

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type DetailedServer

type DetailedServer struct {
	Name         string      `json:"name"`
	URL          OptString   `json:"url"`
	Gamemode     OptString   `json:"gamemode"`
	Language     OptString   `json:"language"`
	PlayersCount OptInt64    `json:"playersCount"`
	CollectedAt  OptDateTime `json:"collectedAt"`
}

Ref: #/components/schemas/DetailedServer

func (*DetailedServer) Decode

func (s *DetailedServer) Decode(d *jx.Decoder) error

Decode decodes DetailedServer from json.

func (*DetailedServer) Encode

func (s *DetailedServer) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DetailedServer) GetCollectedAt

func (s *DetailedServer) GetCollectedAt() OptDateTime

GetCollectedAt returns the value of CollectedAt.

func (*DetailedServer) GetGamemode

func (s *DetailedServer) GetGamemode() OptString

GetGamemode returns the value of Gamemode.

func (*DetailedServer) GetLanguage

func (s *DetailedServer) GetLanguage() OptString

GetLanguage returns the value of Language.

func (*DetailedServer) GetName

func (s *DetailedServer) GetName() string

GetName returns the value of Name.

func (*DetailedServer) GetPlayersCount

func (s *DetailedServer) GetPlayersCount() OptInt64

GetPlayersCount returns the value of PlayersCount.

func (*DetailedServer) GetURL

func (s *DetailedServer) GetURL() OptString

GetURL returns the value of URL.

func (*DetailedServer) MarshalJSON

func (s *DetailedServer) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DetailedServer) SetCollectedAt

func (s *DetailedServer) SetCollectedAt(val OptDateTime)

SetCollectedAt sets the value of CollectedAt.

func (*DetailedServer) SetGamemode

func (s *DetailedServer) SetGamemode(val OptString)

SetGamemode sets the value of Gamemode.

func (*DetailedServer) SetLanguage

func (s *DetailedServer) SetLanguage(val OptString)

SetLanguage sets the value of Language.

func (*DetailedServer) SetName

func (s *DetailedServer) SetName(val string)

SetName sets the value of Name.

func (*DetailedServer) SetPlayersCount

func (s *DetailedServer) SetPlayersCount(val OptInt64)

SetPlayersCount sets the value of PlayersCount.

func (*DetailedServer) SetURL

func (s *DetailedServer) SetURL(val OptString)

SetURL sets the value of URL.

func (*DetailedServer) UnmarshalJSON

func (s *DetailedServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type GetServerNotFound

type GetServerNotFound struct{}

GetServerNotFound is response for GetServer operation.

type GetServerParams

type GetServerParams struct {
	// Multiplayer platform name.
	MultiplayerName string
	// Server host.
	ServerHost string
}

GetServerParams is parameters of getServer operation.

type GetServerRes

type GetServerRes interface {
	// contains filtered or unexported methods
}

type Handler

type Handler interface {
	// GetServer implements getServer operation.
	//
	// Get server by host.
	//
	// GET /multiplayer/{multiplayerName}/server/{serverHost}
	GetServer(ctx context.Context, params GetServerParams) (GetServerRes, error)
	// ListMultiplayerSummaries implements listMultiplayerSummaries operation.
	//
	// Get a summary of multiplayer platforms.
	//
	// GET /multiplayers/summaries
	ListMultiplayerSummaries(ctx context.Context, params ListMultiplayerSummariesParams) ([]MultiplayerSummary, error)
	// ListServerStatistics implements listServerStatistics operation.
	//
	// Get server statistics by host.
	//
	// GET /multiplayer/{multiplayerName}/server/{serverHost}/statistics
	ListServerStatistics(ctx context.Context, params ListServerStatisticsParams) (ListServerStatisticsRes, error)
	// ListServerSummaries implements listServerSummaries operation.
	//
	// List servers for a multiplayer platform.
	//
	// GET /multiplayer/{multiplayerName}/servers
	ListServerSummaries(ctx context.Context, params ListServerSummariesParams) (ListServerSummariesRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// GetServer invokes getServer operation.
	//
	// Get server by host.
	//
	// GET /multiplayer/{multiplayerName}/server/{serverHost}
	GetServer(ctx context.Context, params GetServerParams) (GetServerRes, error)
	// ListMultiplayerSummaries invokes listMultiplayerSummaries operation.
	//
	// Get a summary of multiplayer platforms.
	//
	// GET /multiplayers/summaries
	ListMultiplayerSummaries(ctx context.Context, params ListMultiplayerSummariesParams) ([]MultiplayerSummary, error)
	// ListServerStatistics invokes listServerStatistics operation.
	//
	// Get server statistics by host.
	//
	// GET /multiplayer/{multiplayerName}/server/{serverHost}/statistics
	ListServerStatistics(ctx context.Context, params ListServerStatisticsParams) (ListServerStatisticsRes, error)
	// ListServerSummaries invokes listServerSummaries operation.
	//
	// List servers for a multiplayer platform.
	//
	// GET /multiplayer/{multiplayerName}/servers
	ListServerSummaries(ctx context.Context, params ListServerSummariesParams) (ListServerSummariesRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Labeler

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

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type ListMultiplayerSummariesParams

type ListMultiplayerSummariesParams struct {
	// Sort order by current players count.
	PlayersOrderAsc OptBool `json:",omitempty,omitzero"`
}

ListMultiplayerSummariesParams is parameters of listMultiplayerSummaries operation.

type ListServerStatisticsNotFound

type ListServerStatisticsNotFound struct{}

ListServerStatisticsNotFound is response for ListServerStatistics operation.

type ListServerStatisticsOKApplicationJSON

type ListServerStatisticsOKApplicationJSON []ServerStatisticPoint

func (*ListServerStatisticsOKApplicationJSON) Decode

Decode decodes ListServerStatisticsOKApplicationJSON from json.

func (ListServerStatisticsOKApplicationJSON) Encode

Encode encodes ListServerStatisticsOKApplicationJSON as json.

func (ListServerStatisticsOKApplicationJSON) MarshalJSON

func (s ListServerStatisticsOKApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListServerStatisticsOKApplicationJSON) UnmarshalJSON

func (s *ListServerStatisticsOKApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ListServerStatisticsOKApplicationJSON) Validate

type ListServerStatisticsParams

type ListServerStatisticsParams struct {
	// Multiplayer platform name.
	MultiplayerName string
	// Server host.
	ServerHost string
	// Start of the time range.
	From time.Time
	// End of the time range.
	To time.Time
	// Output precision.
	Precision OptListServerStatisticsPrecision `json:",omitempty,omitzero"`
}

ListServerStatisticsParams is parameters of listServerStatistics operation.

type ListServerStatisticsPrecision

type ListServerStatisticsPrecision string
const (
	ListServerStatisticsPrecisionPerHour ListServerStatisticsPrecision = "perHour"
	ListServerStatisticsPrecisionPerDay  ListServerStatisticsPrecision = "perDay"
)

func (ListServerStatisticsPrecision) AllValues

AllValues returns all ListServerStatisticsPrecision values.

func (ListServerStatisticsPrecision) MarshalText

func (s ListServerStatisticsPrecision) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ListServerStatisticsPrecision) UnmarshalText

func (s *ListServerStatisticsPrecision) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ListServerStatisticsPrecision) Validate

func (s ListServerStatisticsPrecision) Validate() error

type ListServerStatisticsRes

type ListServerStatisticsRes interface {
	// contains filtered or unexported methods
}

type ListServerSummariesNotFound

type ListServerSummariesNotFound struct{}

ListServerSummariesNotFound is response for ListServerSummaries operation.

type ListServerSummariesOKApplicationJSON

type ListServerSummariesOKApplicationJSON []ServerSummary

func (*ListServerSummariesOKApplicationJSON) Decode

Decode decodes ListServerSummariesOKApplicationJSON from json.

func (ListServerSummariesOKApplicationJSON) Encode

Encode encodes ListServerSummariesOKApplicationJSON as json.

func (ListServerSummariesOKApplicationJSON) MarshalJSON

func (s ListServerSummariesOKApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListServerSummariesOKApplicationJSON) UnmarshalJSON

func (s *ListServerSummariesOKApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ListServerSummariesOKApplicationJSON) Validate

type ListServerSummariesParams

type ListServerSummariesParams struct {
	// Multiplayer platform name.
	MultiplayerName string
	// Sort order by players count.
	PlayersOrderAsc OptBool `json:",omitempty,omitzero"`
	// Maximum number of items to return in the response. Used for pagination.
	Limit OptInt32 `json:",omitempty,omitzero"`
	// Number of servers to skip before starting to collect the result set. Used for pagination.
	Offset OptInt32 `json:",omitempty,omitzero"`
	// Whether to include offline servers.
	IncludeOffline OptBool `json:",omitempty,omitzero"`
}

ListServerSummariesParams is parameters of listServerSummaries operation.

type ListServerSummariesRes

type ListServerSummariesRes interface {
	// contains filtered or unexported methods
}

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type MultiplayerSummary

type MultiplayerSummary struct {
	// Multiplayer platform name.
	Name         string `json:"name"`
	PlayersCount int64  `json:"playersCount"`
}

Ref: #/components/schemas/MultiplayerSummary

func (*MultiplayerSummary) Decode

func (s *MultiplayerSummary) Decode(d *jx.Decoder) error

Decode decodes MultiplayerSummary from json.

func (*MultiplayerSummary) Encode

func (s *MultiplayerSummary) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MultiplayerSummary) GetName

func (s *MultiplayerSummary) GetName() string

GetName returns the value of Name.

func (*MultiplayerSummary) GetPlayersCount

func (s *MultiplayerSummary) GetPlayersCount() int64

GetPlayersCount returns the value of PlayersCount.

func (*MultiplayerSummary) MarshalJSON

func (s *MultiplayerSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MultiplayerSummary) SetName

func (s *MultiplayerSummary) SetName(val string)

SetName sets the value of Name.

func (*MultiplayerSummary) SetPlayersCount

func (s *MultiplayerSummary) SetPlayersCount(val int64)

SetPlayersCount sets the value of PlayersCount.

func (*MultiplayerSummary) UnmarshalJSON

func (s *MultiplayerSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	GetServerOperation                OperationName = "GetServer"
	ListMultiplayerSummariesOperation OperationName = "ListMultiplayerSummaries"
	ListServerStatisticsOperation     OperationName = "ListServerStatistics"
	ListServerSummariesOperation      OperationName = "ListServerSummaries"
)

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

type OptDateTime

type OptDateTime struct {
	Value time.Time
	Set   bool
}

OptDateTime is optional time.Time.

func NewOptDateTime

func NewOptDateTime(v time.Time) OptDateTime

NewOptDateTime returns new OptDateTime with value set to v.

func (*OptDateTime) Decode

func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error

Decode decodes time.Time from json.

func (OptDateTime) Encode

func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))

Encode encodes time.Time as json.

func (OptDateTime) Get

func (o OptDateTime) Get() (v time.Time, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDateTime) IsSet

func (o OptDateTime) IsSet() bool

IsSet returns true if OptDateTime was set.

func (OptDateTime) MarshalJSON

func (s OptDateTime) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDateTime) Or

func (o OptDateTime) Or(d time.Time) time.Time

Or returns value if set, or given parameter if does not.

func (*OptDateTime) Reset

func (o *OptDateTime) Reset()

Reset unsets value.

func (*OptDateTime) SetTo

func (o *OptDateTime) SetTo(v time.Time)

SetTo sets value to v.

func (*OptDateTime) UnmarshalJSON

func (s *OptDateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt32

type OptInt32 struct {
	Value int32
	Set   bool
}

OptInt32 is optional int32.

func NewOptInt32

func NewOptInt32(v int32) OptInt32

NewOptInt32 returns new OptInt32 with value set to v.

func (OptInt32) Get

func (o OptInt32) Get() (v int32, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt32) IsSet

func (o OptInt32) IsSet() bool

IsSet returns true if OptInt32 was set.

func (OptInt32) Or

func (o OptInt32) Or(d int32) int32

Or returns value if set, or given parameter if does not.

func (*OptInt32) Reset

func (o *OptInt32) Reset()

Reset unsets value.

func (*OptInt32) SetTo

func (o *OptInt32) SetTo(v int32)

SetTo sets value to v.

type OptInt64

type OptInt64 struct {
	Value int64
	Set   bool
}

OptInt64 is optional int64.

func NewOptInt64

func NewOptInt64(v int64) OptInt64

NewOptInt64 returns new OptInt64 with value set to v.

func (*OptInt64) Decode

func (o *OptInt64) Decode(d *jx.Decoder) error

Decode decodes int64 from json.

func (OptInt64) Encode

func (o OptInt64) Encode(e *jx.Encoder)

Encode encodes int64 as json.

func (OptInt64) Get

func (o OptInt64) Get() (v int64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt64) IsSet

func (o OptInt64) IsSet() bool

IsSet returns true if OptInt64 was set.

func (OptInt64) MarshalJSON

func (s OptInt64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt64) Or

func (o OptInt64) Or(d int64) int64

Or returns value if set, or given parameter if does not.

func (*OptInt64) Reset

func (o *OptInt64) Reset()

Reset unsets value.

func (*OptInt64) SetTo

func (o *OptInt64) SetTo(v int64)

SetTo sets value to v.

func (*OptInt64) UnmarshalJSON

func (s *OptInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptListServerStatisticsPrecision

type OptListServerStatisticsPrecision struct {
	Value ListServerStatisticsPrecision
	Set   bool
}

OptListServerStatisticsPrecision is optional ListServerStatisticsPrecision.

func NewOptListServerStatisticsPrecision

func NewOptListServerStatisticsPrecision(v ListServerStatisticsPrecision) OptListServerStatisticsPrecision

NewOptListServerStatisticsPrecision returns new OptListServerStatisticsPrecision with value set to v.

func (OptListServerStatisticsPrecision) Get

Get returns value and boolean that denotes whether value was set.

func (OptListServerStatisticsPrecision) IsSet

IsSet returns true if OptListServerStatisticsPrecision was set.

func (OptListServerStatisticsPrecision) Or

Or returns value if set, or given parameter if does not.

func (*OptListServerStatisticsPrecision) Reset

Reset unsets value.

func (*OptListServerStatisticsPrecision) SetTo

SetTo sets value to v.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithAttributes

func WithAttributes(attributes ...attribute.KeyValue) Option

WithAttributes specifies default otel attributes.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type Server

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

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type ServerStatisticPoint

type ServerStatisticPoint struct {
	CollectedAt  time.Time `json:"collectedAt"`
	PlayersCount int32     `json:"playersCount"`
}

Ref: #/components/schemas/ServerStatisticPoint

func (*ServerStatisticPoint) Decode

func (s *ServerStatisticPoint) Decode(d *jx.Decoder) error

Decode decodes ServerStatisticPoint from json.

func (*ServerStatisticPoint) Encode

func (s *ServerStatisticPoint) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServerStatisticPoint) GetCollectedAt

func (s *ServerStatisticPoint) GetCollectedAt() time.Time

GetCollectedAt returns the value of CollectedAt.

func (*ServerStatisticPoint) GetPlayersCount

func (s *ServerStatisticPoint) GetPlayersCount() int32

GetPlayersCount returns the value of PlayersCount.

func (*ServerStatisticPoint) MarshalJSON

func (s *ServerStatisticPoint) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServerStatisticPoint) SetCollectedAt

func (s *ServerStatisticPoint) SetCollectedAt(val time.Time)

SetCollectedAt sets the value of CollectedAt.

func (*ServerStatisticPoint) SetPlayersCount

func (s *ServerStatisticPoint) SetPlayersCount(val int32)

SetPlayersCount sets the value of PlayersCount.

func (*ServerStatisticPoint) UnmarshalJSON

func (s *ServerStatisticPoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ServerSummary

type ServerSummary struct {
	Host         string `json:"host"`
	Name         string `json:"name"`
	PlayersCount int32  `json:"playersCount"`
}

Ref: #/components/schemas/ServerSummary

func (*ServerSummary) Decode

func (s *ServerSummary) Decode(d *jx.Decoder) error

Decode decodes ServerSummary from json.

func (*ServerSummary) Encode

func (s *ServerSummary) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ServerSummary) GetHost

func (s *ServerSummary) GetHost() string

GetHost returns the value of Host.

func (*ServerSummary) GetName

func (s *ServerSummary) GetName() string

GetName returns the value of Name.

func (*ServerSummary) GetPlayersCount

func (s *ServerSummary) GetPlayersCount() int32

GetPlayersCount returns the value of PlayersCount.

func (*ServerSummary) MarshalJSON

func (s *ServerSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ServerSummary) SetHost

func (s *ServerSummary) SetHost(val string)

SetHost sets the value of Host.

func (*ServerSummary) SetName

func (s *ServerSummary) SetName(val string)

SetName sets the value of Name.

func (*ServerSummary) SetPlayersCount

func (s *ServerSummary) SetPlayersCount(val int32)

SetPlayersCount sets the value of PlayersCount.

func (*ServerSummary) UnmarshalJSON

func (s *ServerSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) GetServer

func (UnimplementedHandler) GetServer(ctx context.Context, params GetServerParams) (r GetServerRes, _ error)

GetServer implements getServer operation.

Get server by host.

GET /multiplayer/{multiplayerName}/server/{serverHost}

func (UnimplementedHandler) ListMultiplayerSummaries

func (UnimplementedHandler) ListMultiplayerSummaries(ctx context.Context, params ListMultiplayerSummariesParams) (r []MultiplayerSummary, _ error)

ListMultiplayerSummaries implements listMultiplayerSummaries operation.

Get a summary of multiplayer platforms.

GET /multiplayers/summaries

func (UnimplementedHandler) ListServerStatistics

ListServerStatistics implements listServerStatistics operation.

Get server statistics by host.

GET /multiplayer/{multiplayerName}/server/{serverHost}/statistics

func (UnimplementedHandler) ListServerSummaries

ListServerSummaries implements listServerSummaries operation.

List servers for a multiplayer platform.

GET /multiplayer/{multiplayerName}/servers

Jump to

Keyboard shortcuts

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