cmd

package
v0.0.0-...-7dff133 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context) error

Execute run the full command tree.

Types

type MapshotConfigJSON

type MapshotConfigJSON struct {
	Path string `json:"path"`
}

MapshotConfigJSON is a representation of the viewer configuration.

type MapshotJSON

type MapshotJSON struct {
	// Many field omitted that are not used from go.
	TicksPlayed int64 `json:"ticks_played,omitempty"`
}

MapshotJSON is a partial representation of the content of mapshot.json.

type RenderFlags

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

RenderFlags holds parameters to the rendering.

func (*RenderFlags) Register

func (rf *RenderFlags) Register(flags *pflag.FlagSet, prefix string) *RenderFlags

Register creates flags for the rendering parameters.

type Server

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

Server implements a server presenting available mapshots and serving their content.

func (*Server) ServeHTTP

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

type ShotsJSON

type ShotsJSON struct {
	All []*ShotsJSONSave `json:"all"`
}

ShotsJSON is the data sent to the UI to build the listing.

type ShotsJSONInfo

type ShotsJSONInfo struct {
	Name        string `json:"name,omitempty"`
	Path        string `json:"path,omitempty"`
	TicksPlayed int64  `json:"ticks_played,omitempty"`
}

ShotsJSONInfo is part of ShotsJSONSave.

type ShotsJSONSave

type ShotsJSONSave struct {
	Savename string           `json:"savename"`
	Versions []*ShotsJSONInfo `json:"versions"`
}

ShotsJSONSave is part of ShotsJSON.

Jump to

Keyboard shortcuts

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