sportsmatrix

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const SportsmatrixPathPrefix = "/twirp/matrix.v1.Sportsmatrix/"

SportsmatrixPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

Variables

View Source
var File_sportsmatrix_sportsmatrix_proto protoreflect.FileDescriptor

Functions

func WriteError

func WriteError(resp http.ResponseWriter, err error)

WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.

HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.

type JumpReq

type JumpReq struct {
	Board string `protobuf:"bytes,1,opt,name=board,proto3" json:"board,omitempty"`
	// contains filtered or unexported fields
}

func (*JumpReq) Descriptor deprecated

func (*JumpReq) Descriptor() ([]byte, []int)

Deprecated: Use JumpReq.ProtoReflect.Descriptor instead.

func (*JumpReq) GetBoard

func (x *JumpReq) GetBoard() string

func (*JumpReq) ProtoMessage

func (*JumpReq) ProtoMessage()

func (*JumpReq) ProtoReflect

func (x *JumpReq) ProtoReflect() protoreflect.Message

func (*JumpReq) Reset

func (x *JumpReq) Reset()

func (*JumpReq) String

func (x *JumpReq) String() string

type LiveOnlyReq added in v0.0.77

type LiveOnlyReq struct {
	LiveOnly bool `protobuf:"varint,1,opt,name=live_only,json=liveOnly,proto3" json:"live_only,omitempty"`
	// contains filtered or unexported fields
}

func (*LiveOnlyReq) Descriptor deprecated added in v0.0.77

func (*LiveOnlyReq) Descriptor() ([]byte, []int)

Deprecated: Use LiveOnlyReq.ProtoReflect.Descriptor instead.

func (*LiveOnlyReq) GetLiveOnly added in v0.0.77

func (x *LiveOnlyReq) GetLiveOnly() bool

func (*LiveOnlyReq) ProtoMessage added in v0.0.77

func (*LiveOnlyReq) ProtoMessage()

func (*LiveOnlyReq) ProtoReflect added in v0.0.77

func (x *LiveOnlyReq) ProtoReflect() protoreflect.Message

func (*LiveOnlyReq) Reset added in v0.0.77

func (x *LiveOnlyReq) Reset()

func (*LiveOnlyReq) String added in v0.0.77

func (x *LiveOnlyReq) String() string

type SetAllReq

type SetAllReq struct {
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// contains filtered or unexported fields
}

func (*SetAllReq) Descriptor deprecated

func (*SetAllReq) Descriptor() ([]byte, []int)

Deprecated: Use SetAllReq.ProtoReflect.Descriptor instead.

func (*SetAllReq) GetEnabled

func (x *SetAllReq) GetEnabled() bool

func (*SetAllReq) ProtoMessage

func (*SetAllReq) ProtoMessage()

func (*SetAllReq) ProtoReflect

func (x *SetAllReq) ProtoReflect() protoreflect.Message

func (*SetAllReq) Reset

func (x *SetAllReq) Reset()

func (*SetAllReq) String

func (x *SetAllReq) String() string

type Sportsmatrix

func NewSportsmatrixJSONClient

func NewSportsmatrixJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Sportsmatrix

NewSportsmatrixJSONClient creates a JSON client that implements the Sportsmatrix interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewSportsmatrixProtobufClient

func NewSportsmatrixProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Sportsmatrix

NewSportsmatrixProtobufClient creates a Protobuf client that implements the Sportsmatrix interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type Status added in v0.0.83

type Status struct {
	ScreenOn       bool `protobuf:"varint,1,opt,name=screen_on,json=screenOn,proto3" json:"screen_on,omitempty"`
	WebboardOn     bool `protobuf:"varint,2,opt,name=webboard_on,json=webboardOn,proto3" json:"webboard_on,omitempty"`
	CombinedScroll bool `protobuf:"varint,3,opt,name=combined_scroll,json=combinedScroll,proto3" json:"combined_scroll,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated added in v0.0.83

func (*Status) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetCombinedScroll added in v0.0.83

func (x *Status) GetCombinedScroll() bool

func (*Status) GetScreenOn added in v0.0.83

func (x *Status) GetScreenOn() bool

func (*Status) GetWebboardOn added in v0.0.83

func (x *Status) GetWebboardOn() bool

func (*Status) ProtoMessage added in v0.0.83

func (*Status) ProtoMessage()

func (*Status) ProtoReflect added in v0.0.83

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset added in v0.0.83

func (x *Status) Reset()

func (*Status) String added in v0.0.83

func (x *Status) String() string

type TwirpServer

type TwirpServer interface {
	http.Handler

	// ServiceDescriptor returns gzipped bytes describing the .proto file that
	// this service was generated from. Once unzipped, the bytes can be
	// unmarshalled as a
	// google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto.
	//
	// The returned integer is the index of this particular service within that
	// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
	// low-level field, expected to be used for reflection.
	ServiceDescriptor() ([]byte, int)

	// ProtocGenTwirpVersion is the semantic version string of the version of
	// twirp used to generate this file.
	ProtocGenTwirpVersion() string

	// PathPrefix returns the HTTP URL path prefix for all methods handled by this
	// service. This can be used with an HTTP mux to route Twirp requests.
	// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
	// that is, everything in a Twirp route except for the <Method> at the end.
	PathPrefix() string
}

TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.

func NewSportsmatrixServer

func NewSportsmatrixServer(svc Sportsmatrix, opts ...interface{}) TwirpServer

NewSportsmatrixServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

type VersionResp

type VersionResp struct {
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*VersionResp) Descriptor deprecated

func (*VersionResp) Descriptor() ([]byte, []int)

Deprecated: Use VersionResp.ProtoReflect.Descriptor instead.

func (*VersionResp) GetVersion

func (x *VersionResp) GetVersion() string

func (*VersionResp) ProtoMessage

func (*VersionResp) ProtoMessage()

func (*VersionResp) ProtoReflect

func (x *VersionResp) ProtoReflect() protoreflect.Message

func (*VersionResp) Reset

func (x *VersionResp) Reset()

func (*VersionResp) String

func (x *VersionResp) String() string

Jump to

Keyboard shortcuts

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