Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSportsmatrixServer(s grpc.ServiceRegistrar, srv SportsmatrixServer)
- func WriteError(resp http.ResponseWriter, err error)
- type HTTPClient
- type JumpReq
- type LiveOnlyReq
- type ScreenStatusResp
- func (*ScreenStatusResp) Descriptor() ([]byte, []int)deprecated
- func (x *ScreenStatusResp) GetScreenOn() bool
- func (x *ScreenStatusResp) GetWebboardOn() bool
- func (*ScreenStatusResp) ProtoMessage()
- func (x *ScreenStatusResp) ProtoReflect() protoreflect.Message
- func (x *ScreenStatusResp) Reset()
- func (x *ScreenStatusResp) String() string
- type SetAllReq
- type Sportsmatrix
- type SportsmatrixClient
- type SportsmatrixServer
- type TwirpServer
- type UnimplementedSportsmatrixServer
- func (UnimplementedSportsmatrixServer) Jump(context.Context, *JumpReq) (*empty.Empty, error)
- func (UnimplementedSportsmatrixServer) NextBoard(context.Context, *empty.Empty) (*empty.Empty, error)
- func (UnimplementedSportsmatrixServer) RestartService(context.Context, *empty.Empty) (*empty.Empty, error)
- func (UnimplementedSportsmatrixServer) ScreenOff(context.Context, *empty.Empty) (*empty.Empty, error)
- func (UnimplementedSportsmatrixServer) ScreenOn(context.Context, *empty.Empty) (*empty.Empty, error)
- func (UnimplementedSportsmatrixServer) SetAll(context.Context, *SetAllReq) (*empty.Empty, error)
- func (UnimplementedSportsmatrixServer) SetLiveOnly(context.Context, *LiveOnlyReq) (*empty.Empty, error)
- func (UnimplementedSportsmatrixServer) Status(context.Context, *empty.Empty) (*ScreenStatusResp, error)
- func (UnimplementedSportsmatrixServer) Version(context.Context, *empty.Empty) (*VersionResp, error)
- type UnsafeSportsmatrixServer
- type VersionResp
Constants ¶
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 ¶
var File_sportsmatrix_sportsmatrix_proto protoreflect.FileDescriptor
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 ¶
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) ProtoMessage ¶
func (*JumpReq) ProtoMessage()
func (*JumpReq) ProtoReflect ¶
func (x *JumpReq) ProtoReflect() protoreflect.Message
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) GetEnabled ¶
func (*SetAllReq) ProtoMessage ¶
func (*SetAllReq) ProtoMessage()
func (*SetAllReq) ProtoReflect ¶
func (x *SetAllReq) ProtoReflect() protoreflect.Message
type Sportsmatrix ¶
type Sportsmatrix interface { Version(context.Context, *google_protobuf.Empty) (*VersionResp, error) ScreenOn(context.Context, *google_protobuf.Empty) (*google_protobuf.Empty, error) ScreenOff(context.Context, *google_protobuf.Empty) (*google_protobuf.Empty, error) Status(context.Context, *google_protobuf.Empty) (*ScreenStatusResp, error) SetAll(context.Context, *SetAllReq) (*google_protobuf.Empty, error) Jump(context.Context, *JumpReq) (*google_protobuf.Empty, error) NextBoard(context.Context, *google_protobuf.Empty) (*google_protobuf.Empty, error) RestartService(context.Context, *google_protobuf.Empty) (*google_protobuf.Empty, error) SetLiveOnly(context.Context, *LiveOnlyReq) (*google_protobuf.Empty, error) }
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.
func NewSportsmatrixClient ¶
func NewSportsmatrixClient(cc grpc.ClientConnInterface) SportsmatrixClient
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) RestartService ¶ added in v0.0.75
func (UnimplementedSportsmatrixServer) SetLiveOnly ¶ added in v0.0.77
func (UnimplementedSportsmatrixServer) SetLiveOnly(context.Context, *LiveOnlyReq) (*empty.Empty, error)
func (UnimplementedSportsmatrixServer) Status ¶
func (UnimplementedSportsmatrixServer) Status(context.Context, *empty.Empty) (*ScreenStatusResp, error)
func (UnimplementedSportsmatrixServer) Version ¶
func (UnimplementedSportsmatrixServer) Version(context.Context, *empty.Empty) (*VersionResp, error)
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