Documentation
¶
Index ¶
- func BuildRandomServer() server.Server
- func BuildServer(opts ...BuildServerOption) server.Server
- func CreateServer(ctx context.Context, repo repositories.ServerRepository, ...) server.Server
- func SaveServer(ctx context.Context, repo repositories.ServerRepository, svr server.Server) server.Server
- type BuildServerOption
- func WithAddress(ip string, port int) BuildServerOption
- func WithDiscoveryStatus(status status.DiscoveryStatus) BuildServerOption
- func WithExtraFields(extraFields map[string]string) BuildServerOption
- func WithInfo(fields map[string]string) BuildServerOption
- func WithNoInfo() BuildServerOption
- func WithObjectives(objectives []map[string]string) BuildServerOption
- func WithPlayers(players []map[string]string) BuildServerOption
- func WithQueryPort(queryPort int) BuildServerOption
- type BuildServerParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRandomServer ¶
func BuildServer ¶
func BuildServer(opts ...BuildServerOption) server.Server
func CreateServer ¶
func CreateServer( ctx context.Context, repo repositories.ServerRepository, opts ...BuildServerOption, ) server.Server
func SaveServer ¶
func SaveServer( ctx context.Context, repo repositories.ServerRepository, svr server.Server, ) server.Server
Types ¶
type BuildServerOption ¶
type BuildServerOption func(*BuildServerParams)
func WithAddress ¶
func WithAddress(ip string, port int) BuildServerOption
func WithDiscoveryStatus ¶
func WithDiscoveryStatus(status status.DiscoveryStatus) BuildServerOption
func WithExtraFields ¶
func WithExtraFields(extraFields map[string]string) BuildServerOption
func WithInfo ¶
func WithInfo(fields map[string]string) BuildServerOption
func WithNoInfo ¶
func WithNoInfo() BuildServerOption
func WithObjectives ¶
func WithObjectives(objectives []map[string]string) BuildServerOption
func WithPlayers ¶
func WithPlayers(players []map[string]string) BuildServerOption
func WithQueryPort ¶
func WithQueryPort(queryPort int) BuildServerOption
Click to show internal directories.
Click to hide internal directories.