Documentation ¶
Overview ¶
Package trackdata is a generated twirp stub package. This code was generated with github.com/twitchtv/twirp/protoc-gen-twirp v5.3.0.
It is generated from these files:
rpc/service.proto
Index ¶
- Constants
- func WriteError(resp http.ResponseWriter, err error)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type HTTPClient
- type TrackChunk
- func (*TrackChunk) Descriptor() ([]byte, []int)
- func (m *TrackChunk) GetData() []byte
- func (m *TrackChunk) GetNumBytes() int32
- func (m *TrackChunk) GetStartPosition() int32
- func (*TrackChunk) ProtoMessage()
- func (m *TrackChunk) Reset()
- func (m *TrackChunk) String() string
- func (m *TrackChunk) XXX_DiscardUnknown()
- func (m *TrackChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TrackChunk) XXX_Merge(src proto.Message)
- func (m *TrackChunk) XXX_Size() int
- func (m *TrackChunk) XXX_Unmarshal(b []byte) error
- type TrackChunkOrError
- type TrackDataService
- type TrackServerId
- func (*TrackServerId) Descriptor() ([]byte, []int)
- func (m *TrackServerId) GetTrackServerId() string
- func (*TrackServerId) ProtoMessage()
- func (m *TrackServerId) Reset()
- func (m *TrackServerId) String() string
- func (m *TrackServerId) XXX_DiscardUnknown()
- func (m *TrackServerId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TrackServerId) XXX_Merge(src proto.Message)
- func (m *TrackServerId) XXX_Size() int
- func (m *TrackServerId) XXX_Unmarshal(b []byte) error
- type TrackUpload
- func (*TrackUpload) Descriptor() ([]byte, []int)
- func (m *TrackUpload) GetData() []byte
- func (m *TrackUpload) GetName() string
- func (m *TrackUpload) GetTrackId() string
- func (m *TrackUpload) GetUserId() string
- func (*TrackUpload) ProtoMessage()
- func (m *TrackUpload) Reset()
- func (m *TrackUpload) String() string
- func (m *TrackUpload) XXX_DiscardUnknown()
- func (m *TrackUpload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TrackUpload) XXX_Merge(src proto.Message)
- func (m *TrackUpload) XXX_Size() int
- func (m *TrackUpload) XXX_Unmarshal(b []byte) error
- type TwirpServer
- type UserTrack
- func (*UserTrack) Descriptor() ([]byte, []int)
- func (m *UserTrack) GetTrackId() string
- func (m *UserTrack) GetUserId() string
- func (*UserTrack) ProtoMessage()
- func (m *UserTrack) Reset()
- func (m *UserTrack) String() string
- func (m *UserTrack) XXX_DiscardUnknown()
- func (m *UserTrack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UserTrack) XXX_Merge(src proto.Message)
- func (m *UserTrack) XXX_Size() int
- func (m *UserTrack) XXX_Unmarshal(b []byte) error
Constants ¶
const TrackDataServicePathPrefix = "/twirp/resonate.api.trackdata.TrackDataService/"
TrackDataServicePathPrefix is used for all URL paths on a twirp TrackDataService server. Requests are always: POST TrackDataServicePathPrefix/method It can be used in an HTTP mux to route twirp requests along with non-twirp requests on other routes.
Variables ¶
This section is empty.
Functions ¶
func WriteError ¶
func WriteError(resp http.ResponseWriter, err error)
WriteError writes an HTTP response with a valid Twirp error format. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
Types ¶
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
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 TrackChunk ¶
type TrackChunk struct { StartPosition int32 `protobuf:"varint,1,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` NumBytes int32 `protobuf:"varint,2,opt,name=num_bytes,json=numBytes,proto3" json:"num_bytes,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TrackChunk) Descriptor ¶
func (*TrackChunk) Descriptor() ([]byte, []int)
func (*TrackChunk) GetData ¶
func (m *TrackChunk) GetData() []byte
func (*TrackChunk) GetNumBytes ¶
func (m *TrackChunk) GetNumBytes() int32
func (*TrackChunk) GetStartPosition ¶
func (m *TrackChunk) GetStartPosition() int32
func (*TrackChunk) ProtoMessage ¶
func (*TrackChunk) ProtoMessage()
func (*TrackChunk) Reset ¶
func (m *TrackChunk) Reset()
func (*TrackChunk) String ¶
func (m *TrackChunk) String() string
func (*TrackChunk) XXX_DiscardUnknown ¶
func (m *TrackChunk) XXX_DiscardUnknown()
func (*TrackChunk) XXX_Marshal ¶
func (m *TrackChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TrackChunk) XXX_Merge ¶
func (dst *TrackChunk) XXX_Merge(src proto.Message)
func (*TrackChunk) XXX_Size ¶
func (m *TrackChunk) XXX_Size() int
func (*TrackChunk) XXX_Unmarshal ¶
func (m *TrackChunk) XXX_Unmarshal(b []byte) error
type TrackChunkOrError ¶
type TrackChunkOrError struct { Msg *TrackChunk Err error }
type TrackDataService ¶
type TrackDataService interface { StreamTrackData(ctx context.Context, in *UserTrack) (<-chan TrackChunkOrError, error) UploadTrackData(ctx context.Context, in *TrackUpload) (*TrackServerId, error) }
func NewTrackDataServiceJSONClient ¶
func NewTrackDataServiceJSONClient(addr string, client HTTPClient) TrackDataService
NewTrackDataServiceJSONClient creates a JSON client that implements the TrackDataService interface. It communicates using JSON and can be configured with a custom HTTPClient.
func NewTrackDataServiceProtobufClient ¶
func NewTrackDataServiceProtobufClient(addr string, client HTTPClient) TrackDataService
NewTrackDataServiceProtobufClient creates a Protobuf client that implements the TrackDataService interface. It communicates using Protobuf and can be configured with a custom HTTPClient.
type TrackServerId ¶
type TrackServerId struct { TrackServerId string `protobuf:"bytes,1,opt,name=track_server_id,json=trackServerId,proto3" json:"track_server_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TrackServerId) Descriptor ¶
func (*TrackServerId) Descriptor() ([]byte, []int)
func (*TrackServerId) GetTrackServerId ¶
func (m *TrackServerId) GetTrackServerId() string
func (*TrackServerId) ProtoMessage ¶
func (*TrackServerId) ProtoMessage()
func (*TrackServerId) Reset ¶
func (m *TrackServerId) Reset()
func (*TrackServerId) String ¶
func (m *TrackServerId) String() string
func (*TrackServerId) XXX_DiscardUnknown ¶
func (m *TrackServerId) XXX_DiscardUnknown()
func (*TrackServerId) XXX_Marshal ¶
func (m *TrackServerId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TrackServerId) XXX_Merge ¶
func (dst *TrackServerId) XXX_Merge(src proto.Message)
func (*TrackServerId) XXX_Size ¶
func (m *TrackServerId) XXX_Size() int
func (*TrackServerId) XXX_Unmarshal ¶
func (m *TrackServerId) XXX_Unmarshal(b []byte) error
type TrackUpload ¶
type TrackUpload struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` TrackId string `protobuf:"bytes,3,opt,name=track_id,json=trackId,proto3" json:"track_id,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TrackUpload) Descriptor ¶
func (*TrackUpload) Descriptor() ([]byte, []int)
func (*TrackUpload) GetData ¶
func (m *TrackUpload) GetData() []byte
func (*TrackUpload) GetName ¶
func (m *TrackUpload) GetName() string
func (*TrackUpload) GetTrackId ¶
func (m *TrackUpload) GetTrackId() string
func (*TrackUpload) GetUserId ¶
func (m *TrackUpload) GetUserId() string
func (*TrackUpload) ProtoMessage ¶
func (*TrackUpload) ProtoMessage()
func (*TrackUpload) Reset ¶
func (m *TrackUpload) Reset()
func (*TrackUpload) String ¶
func (m *TrackUpload) String() string
func (*TrackUpload) XXX_DiscardUnknown ¶
func (m *TrackUpload) XXX_DiscardUnknown()
func (*TrackUpload) XXX_Marshal ¶
func (m *TrackUpload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TrackUpload) XXX_Merge ¶
func (dst *TrackUpload) XXX_Merge(src proto.Message)
func (*TrackUpload) XXX_Size ¶
func (m *TrackUpload) XXX_Size() int
func (*TrackUpload) XXX_Unmarshal ¶
func (m *TrackUpload) XXX_Unmarshal(b []byte) error
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 // github.com/golang/protobuf/protoc-gen-go/descriptor.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 }
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 NewTrackDataServiceServer ¶
func NewTrackDataServiceServer(svc TrackDataService, hooks *twirp.ServerHooks) TwirpServer
type UserTrack ¶
type UserTrack struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` TrackId string `protobuf:"bytes,2,opt,name=track_id,json=trackId,proto3" json:"track_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserTrack) Descriptor ¶
func (*UserTrack) GetTrackId ¶
func (*UserTrack) ProtoMessage ¶
func (*UserTrack) ProtoMessage()
func (*UserTrack) XXX_DiscardUnknown ¶
func (m *UserTrack) XXX_DiscardUnknown()