sportsmatrix

package
v0.0.81 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: GPL-3.0 Imports: 24 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
View Source
var Sportsmatrix_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "matrix.v1.Sportsmatrix",
	HandlerType: (*SportsmatrixServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Version",
			Handler:    _Sportsmatrix_Version_Handler,
		},
		{
			MethodName: "ScreenOn",
			Handler:    _Sportsmatrix_ScreenOn_Handler,
		},
		{
			MethodName: "ScreenOff",
			Handler:    _Sportsmatrix_ScreenOff_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Sportsmatrix_Status_Handler,
		},
		{
			MethodName: "SetAll",
			Handler:    _Sportsmatrix_SetAll_Handler,
		},
		{
			MethodName: "Jump",
			Handler:    _Sportsmatrix_Jump_Handler,
		},
		{
			MethodName: "NextBoard",
			Handler:    _Sportsmatrix_NextBoard_Handler,
		},
		{
			MethodName: "RestartService",
			Handler:    _Sportsmatrix_RestartService_Handler,
		},
		{
			MethodName: "SetLiveOnly",
			Handler:    _Sportsmatrix_SetLiveOnly_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sportsmatrix/sportsmatrix.proto",
}

Sportsmatrix_ServiceDesc is the grpc.ServiceDesc for Sportsmatrix service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSportsmatrixServer

func RegisterSportsmatrixServer(s grpc.ServiceRegistrar, srv SportsmatrixServer)

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 ScreenStatusResp

type ScreenStatusResp 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"`
	// contains filtered or unexported fields
}

func (*ScreenStatusResp) Descriptor deprecated

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

Deprecated: Use ScreenStatusResp.ProtoReflect.Descriptor instead.

func (*ScreenStatusResp) GetScreenOn

func (x *ScreenStatusResp) GetScreenOn() bool

func (*ScreenStatusResp) GetWebboardOn

func (x *ScreenStatusResp) GetWebboardOn() bool

func (*ScreenStatusResp) ProtoMessage

func (*ScreenStatusResp) ProtoMessage()

func (*ScreenStatusResp) ProtoReflect

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

func (*ScreenStatusResp) Reset

func (x *ScreenStatusResp) Reset()

func (*ScreenStatusResp) String

func (x *ScreenStatusResp) 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 SportsmatrixClient

type SportsmatrixClient interface {
	Version(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*VersionResp, error)
	ScreenOn(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	ScreenOff(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	Status(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ScreenStatusResp, error)
	SetAll(ctx context.Context, in *SetAllReq, opts ...grpc.CallOption) (*empty.Empty, error)
	Jump(ctx context.Context, in *JumpReq, opts ...grpc.CallOption) (*empty.Empty, error)
	NextBoard(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	RestartService(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	SetLiveOnly(ctx context.Context, in *LiveOnlyReq, opts ...grpc.CallOption) (*empty.Empty, error)
}

SportsmatrixClient is the client API for Sportsmatrix service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type SportsmatrixServer

type SportsmatrixServer interface {
	Version(context.Context, *empty.Empty) (*VersionResp, error)
	ScreenOn(context.Context, *empty.Empty) (*empty.Empty, error)
	ScreenOff(context.Context, *empty.Empty) (*empty.Empty, error)
	Status(context.Context, *empty.Empty) (*ScreenStatusResp, error)
	SetAll(context.Context, *SetAllReq) (*empty.Empty, error)
	Jump(context.Context, *JumpReq) (*empty.Empty, error)
	NextBoard(context.Context, *empty.Empty) (*empty.Empty, error)
	RestartService(context.Context, *empty.Empty) (*empty.Empty, error)
	SetLiveOnly(context.Context, *LiveOnlyReq) (*empty.Empty, error)
	// contains filtered or unexported methods
}

SportsmatrixServer is the server API for Sportsmatrix service. All implementations must embed UnimplementedSportsmatrixServer for forward compatibility

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 UnimplementedSportsmatrixServer

type UnimplementedSportsmatrixServer struct {
}

UnimplementedSportsmatrixServer must be embedded to have forward compatible implementations.

func (UnimplementedSportsmatrixServer) Jump

func (UnimplementedSportsmatrixServer) NextBoard

func (UnimplementedSportsmatrixServer) RestartService added in v0.0.75

func (UnimplementedSportsmatrixServer) ScreenOff

func (UnimplementedSportsmatrixServer) ScreenOn

func (UnimplementedSportsmatrixServer) SetAll

func (UnimplementedSportsmatrixServer) SetLiveOnly added in v0.0.77

func (UnimplementedSportsmatrixServer) Status

func (UnimplementedSportsmatrixServer) Version

type UnsafeSportsmatrixServer

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

UnsafeSportsmatrixServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SportsmatrixServer will result in compilation errors.

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