mi

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: CC0-1.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SwitchTracker_Members_FullMethodName      = "/within.website.x.mi.SwitchTracker/Members"
	SwitchTracker_WhoIsFront_FullMethodName   = "/within.website.x.mi.SwitchTracker/WhoIsFront"
	SwitchTracker_Switch_FullMethodName       = "/within.website.x.mi.SwitchTracker/Switch"
	SwitchTracker_GetSwitch_FullMethodName    = "/within.website.x.mi.SwitchTracker/GetSwitch"
	SwitchTracker_ListSwitches_FullMethodName = "/within.website.x.mi.SwitchTracker/ListSwitches"
)
View Source
const (
	Events_Get_FullMethodName = "/within.website.x.mi.Events/Get"
	Events_Add_FullMethodName = "/within.website.x.mi.Events/Add"
)
View Source
const EventsPathPrefix = "/twirp/within.website.x.mi.Events/"

EventsPathPrefix 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

View Source
const POSSEPathPrefix = "/twirp/within.website.x.mi.POSSE/"

POSSEPathPrefix 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

View Source
const (
	POSSE_RefreshBlog_FullMethodName = "/within.website.x.mi.POSSE/RefreshBlog"
)
View Source
const SwitchTrackerPathPrefix = "/twirp/within.website.x.mi.SwitchTracker/"

SwitchTrackerPathPrefix 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 (
	ErrNoMemberName         = errors.New("mi: no member name defined")
	ErrNoSuchMemberInSystem = errors.New("mi: no such member in system")
	ErrNoSwitchID           = errors.New("mi: no switch ID defined")
)
View Source
var Events_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "within.website.x.mi.Events",
	HandlerType: (*EventsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Events_Get_Handler,
		},
		{
			MethodName: "Add",
			Handler:    _Events_Add_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mi.proto",
}

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

View Source
var POSSE_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "within.website.x.mi.POSSE",
	HandlerType: (*POSSEServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RefreshBlog",
			Handler:    _POSSE_RefreshBlog_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mi.proto",
}

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

View Source
var SwitchTracker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "within.website.x.mi.SwitchTracker",
	HandlerType: (*SwitchTrackerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Members",
			Handler:    _SwitchTracker_Members_Handler,
		},
		{
			MethodName: "WhoIsFront",
			Handler:    _SwitchTracker_WhoIsFront_Handler,
		},
		{
			MethodName: "Switch",
			Handler:    _SwitchTracker_Switch_Handler,
		},
		{
			MethodName: "GetSwitch",
			Handler:    _SwitchTracker_GetSwitch_Handler,
		},
		{
			MethodName: "ListSwitches",
			Handler:    _SwitchTracker_ListSwitches_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mi.proto",
}

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

Functions

func RegisterEventsServer

func RegisterEventsServer(s grpc.ServiceRegistrar, srv EventsServer)

func RegisterPOSSEServer

func RegisterPOSSEServer(s grpc.ServiceRegistrar, srv POSSEServer)

func RegisterSwitchTrackerServer

func RegisterSwitchTrackerServer(s grpc.ServiceRegistrar, srv SwitchTrackerServer)

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 Event

type Event struct {

	// The name of the event
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The URL for the event
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// The day the event starts
	StartDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
	// The day the event ends
	EndDate *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"`
	// The location of the event (human-readable)
	Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"`
	// Id of the event
	Id int32 `protobuf:"varint,6,opt,name=id,proto3" json:"id,omitempty"`
	// The description of the event
	Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

Event represents an event that Xe will be attending.

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetDescription

func (x *Event) GetDescription() string

func (*Event) GetEndDate

func (x *Event) GetEndDate() *timestamppb.Timestamp

func (*Event) GetId

func (x *Event) GetId() int32

func (*Event) GetLocation

func (x *Event) GetLocation() string

func (*Event) GetName

func (x *Event) GetName() string

func (*Event) GetStartDate

func (x *Event) GetStartDate() *timestamppb.Timestamp

func (*Event) GetUrl

func (x *Event) GetUrl() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventFeed

type EventFeed struct {

	// The events in the feed
	Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

A feed of events, result from mi query.

func (*EventFeed) Descriptor deprecated

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

Deprecated: Use EventFeed.ProtoReflect.Descriptor instead.

func (*EventFeed) GetEvents

func (x *EventFeed) GetEvents() []*Event

func (*EventFeed) ProtoMessage

func (*EventFeed) ProtoMessage()

func (*EventFeed) ProtoReflect

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

func (*EventFeed) Reset

func (x *EventFeed) Reset()

func (*EventFeed) String

func (x *EventFeed) String() string

type Events

type Events interface {
	// Get fetches the current feed of upcoming events.
	Get(context.Context, *google_protobuf.Empty) (*EventFeed, error)

	// Add adds an event to the feed.
	Add(context.Context, *Event) (*google_protobuf.Empty, error)
}

Events lets users fetch the current feed of events that Xe will be attending.

func NewEventsJSONClient

func NewEventsJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Events

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

func NewEventsProtobufClient

func NewEventsProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Events

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

type EventsClient

type EventsClient interface {
	// Get fetches the current feed of upcoming events.
	Get(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*EventFeed, error)
	// Add adds an event to the feed.
	Add(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

EventsClient is the client API for Events 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 NewEventsClient

func NewEventsClient(cc grpc.ClientConnInterface) EventsClient

type EventsServer

type EventsServer interface {
	// Get fetches the current feed of upcoming events.
	Get(context.Context, *emptypb.Empty) (*EventFeed, error)
	// Add adds an event to the feed.
	Add(context.Context, *Event) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

EventsServer is the server API for Events service. All implementations must embed UnimplementedEventsServer for forward compatibility

type FrontChange

type FrontChange struct {
	Switch *Switch `protobuf:"bytes,1,opt,name=switch,proto3" json:"switch,omitempty"` // required
	Member *Member `protobuf:"bytes,2,opt,name=member,proto3" json:"member,omitempty"` // required
	// contains filtered or unexported fields
}

func (*FrontChange) Descriptor deprecated

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

Deprecated: Use FrontChange.ProtoReflect.Descriptor instead.

func (*FrontChange) GetMember

func (x *FrontChange) GetMember() *Member

func (*FrontChange) GetSwitch

func (x *FrontChange) GetSwitch() *Switch

func (*FrontChange) ProtoMessage

func (*FrontChange) ProtoMessage()

func (*FrontChange) ProtoReflect

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

func (*FrontChange) Reset

func (x *FrontChange) Reset()

func (*FrontChange) String

func (x *FrontChange) String() string

type GetSwitchReq

type GetSwitchReq struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // required
	// contains filtered or unexported fields
}

func (*GetSwitchReq) Descriptor deprecated

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

Deprecated: Use GetSwitchReq.ProtoReflect.Descriptor instead.

func (*GetSwitchReq) GetId

func (x *GetSwitchReq) GetId() string

func (*GetSwitchReq) ProtoMessage

func (*GetSwitchReq) ProtoMessage()

func (*GetSwitchReq) ProtoReflect

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

func (*GetSwitchReq) Reset

func (x *GetSwitchReq) Reset()

func (*GetSwitchReq) String

func (x *GetSwitchReq) String() string

func (*GetSwitchReq) Valid

func (gsr *GetSwitchReq) Valid() error

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 ListSwitchesReq

type ListSwitchesReq struct {
	Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // required
	Page  int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`   // required
	// contains filtered or unexported fields
}

func (*ListSwitchesReq) Descriptor deprecated

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

Deprecated: Use ListSwitchesReq.ProtoReflect.Descriptor instead.

func (*ListSwitchesReq) GetCount

func (x *ListSwitchesReq) GetCount() int32

func (*ListSwitchesReq) GetPage

func (x *ListSwitchesReq) GetPage() int32

func (*ListSwitchesReq) ProtoMessage

func (*ListSwitchesReq) ProtoMessage()

func (*ListSwitchesReq) ProtoReflect

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

func (*ListSwitchesReq) Reset

func (x *ListSwitchesReq) Reset()

func (*ListSwitchesReq) String

func (x *ListSwitchesReq) String() string

type ListSwitchesResp

type ListSwitchesResp struct {
	Switches []*FrontChange `protobuf:"bytes,1,rep,name=switches,proto3" json:"switches,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSwitchesResp) Descriptor deprecated

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

Deprecated: Use ListSwitchesResp.ProtoReflect.Descriptor instead.

func (*ListSwitchesResp) GetSwitches

func (x *ListSwitchesResp) GetSwitches() []*FrontChange

func (*ListSwitchesResp) ProtoMessage

func (*ListSwitchesResp) ProtoMessage()

func (*ListSwitchesResp) ProtoReflect

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

func (*ListSwitchesResp) Reset

func (x *ListSwitchesResp) Reset()

func (*ListSwitchesResp) String

func (x *ListSwitchesResp) String() string

type Member

type Member struct {
	Id        int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                               // required
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                            // required
	AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` // required
	// contains filtered or unexported fields
}

func (*Member) Descriptor deprecated

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

Deprecated: Use Member.ProtoReflect.Descriptor instead.

func (*Member) GetAvatarUrl

func (x *Member) GetAvatarUrl() string

func (*Member) GetId

func (x *Member) GetId() int32

func (*Member) GetName

func (x *Member) GetName() string

func (*Member) LogValue

func (m *Member) LogValue() slog.Value

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) ProtoReflect

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

func (*Member) Reset

func (x *Member) Reset()

func (*Member) String

func (x *Member) String() string

type MembersResp

type MembersResp struct {
	Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` // required
	// contains filtered or unexported fields
}

func (*MembersResp) Descriptor deprecated

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

Deprecated: Use MembersResp.ProtoReflect.Descriptor instead.

func (*MembersResp) GetMembers

func (x *MembersResp) GetMembers() []*Member

func (*MembersResp) ProtoMessage

func (*MembersResp) ProtoMessage()

func (*MembersResp) ProtoReflect

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

func (*MembersResp) Reset

func (x *MembersResp) Reset()

func (*MembersResp) String

func (x *MembersResp) String() string

type POSSE

type POSSE interface {
	RefreshBlog(context.Context, *google_protobuf.Empty) (*google_protobuf.Empty, error)
}

func NewPOSSEJSONClient

func NewPOSSEJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) POSSE

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

func NewPOSSEProtobufClient

func NewPOSSEProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) POSSE

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

type POSSEClient

type POSSEClient interface {
	RefreshBlog(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

POSSEClient is the client API for POSSE 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 NewPOSSEClient

func NewPOSSEClient(cc grpc.ClientConnInterface) POSSEClient

type POSSEServer

type POSSEServer interface {
	RefreshBlog(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

POSSEServer is the server API for POSSE service. All implementations must embed UnimplementedPOSSEServer for forward compatibility

type Switch

type Switch struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                // required
	MemberId  int32  `protobuf:"varint,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`   // required
	StartedAt string `protobuf:"bytes,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` // RFC 3339, required
	EndedAt   string `protobuf:"bytes,4,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"`       // RFC 3339, optional if switch is current
	// contains filtered or unexported fields
}

func (*Switch) Descriptor deprecated

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

Deprecated: Use Switch.ProtoReflect.Descriptor instead.

func (*Switch) GetEndedAt

func (x *Switch) GetEndedAt() string

func (*Switch) GetId

func (x *Switch) GetId() string

func (*Switch) GetMemberId

func (x *Switch) GetMemberId() int32

func (*Switch) GetStartedAt

func (x *Switch) GetStartedAt() string

func (*Switch) LogValue

func (s *Switch) LogValue() slog.Value

func (*Switch) ProtoMessage

func (*Switch) ProtoMessage()

func (*Switch) ProtoReflect

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

func (*Switch) Reset

func (x *Switch) Reset()

func (*Switch) String

func (x *Switch) String() string

type SwitchReq

type SwitchReq struct {
	MemberName string `protobuf:"bytes,1,opt,name=member_name,json=memberName,proto3" json:"member_name,omitempty"` // required
	// contains filtered or unexported fields
}

func (*SwitchReq) Descriptor deprecated

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

Deprecated: Use SwitchReq.ProtoReflect.Descriptor instead.

func (*SwitchReq) GetMemberName

func (x *SwitchReq) GetMemberName() string

func (*SwitchReq) LogValue

func (sr *SwitchReq) LogValue() slog.Value

func (*SwitchReq) ProtoMessage

func (*SwitchReq) ProtoMessage()

func (*SwitchReq) ProtoReflect

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

func (*SwitchReq) Reset

func (x *SwitchReq) Reset()

func (*SwitchReq) String

func (x *SwitchReq) String() string

func (*SwitchReq) Valid

func (sr *SwitchReq) Valid() error

type SwitchResp

type SwitchResp struct {
	Old     *Switch `protobuf:"bytes,1,opt,name=old,proto3" json:"old,omitempty"`         // required
	Current *Switch `protobuf:"bytes,2,opt,name=current,proto3" json:"current,omitempty"` // required
	// contains filtered or unexported fields
}

func (*SwitchResp) Descriptor deprecated

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

Deprecated: Use SwitchResp.ProtoReflect.Descriptor instead.

func (*SwitchResp) GetCurrent

func (x *SwitchResp) GetCurrent() *Switch

func (*SwitchResp) GetOld

func (x *SwitchResp) GetOld() *Switch

func (*SwitchResp) LogValue

func (sr *SwitchResp) LogValue() slog.Value

func (*SwitchResp) ProtoMessage

func (*SwitchResp) ProtoMessage()

func (*SwitchResp) ProtoReflect

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

func (*SwitchResp) Reset

func (x *SwitchResp) Reset()

func (*SwitchResp) String

func (x *SwitchResp) String() string

type SwitchTracker

func NewSwitchTrackerJSONClient

func NewSwitchTrackerJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) SwitchTracker

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

func NewSwitchTrackerProtobufClient

func NewSwitchTrackerProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) SwitchTracker

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

type SwitchTrackerClient

type SwitchTrackerClient interface {
	Members(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MembersResp, error)
	WhoIsFront(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FrontChange, error)
	Switch(ctx context.Context, in *SwitchReq, opts ...grpc.CallOption) (*SwitchResp, error)
	GetSwitch(ctx context.Context, in *GetSwitchReq, opts ...grpc.CallOption) (*FrontChange, error)
	ListSwitches(ctx context.Context, in *ListSwitchesReq, opts ...grpc.CallOption) (*ListSwitchesResp, error)
}

SwitchTrackerClient is the client API for SwitchTracker 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 SwitchTrackerServer

type SwitchTrackerServer interface {
	Members(context.Context, *emptypb.Empty) (*MembersResp, error)
	WhoIsFront(context.Context, *emptypb.Empty) (*FrontChange, error)
	Switch(context.Context, *SwitchReq) (*SwitchResp, error)
	GetSwitch(context.Context, *GetSwitchReq) (*FrontChange, error)
	ListSwitches(context.Context, *ListSwitchesReq) (*ListSwitchesResp, error)
	// contains filtered or unexported methods
}

SwitchTrackerServer is the server API for SwitchTracker service. All implementations must embed UnimplementedSwitchTrackerServer 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 NewEventsServer

func NewEventsServer(svc Events, opts ...interface{}) TwirpServer

NewEventsServer 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).

func NewPOSSEServer

func NewPOSSEServer(svc POSSE, opts ...interface{}) TwirpServer

NewPOSSEServer 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).

func NewSwitchTrackerServer

func NewSwitchTrackerServer(svc SwitchTracker, opts ...interface{}) TwirpServer

NewSwitchTrackerServer 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 UnimplementedEventsServer

type UnimplementedEventsServer struct {
}

UnimplementedEventsServer must be embedded to have forward compatible implementations.

func (UnimplementedEventsServer) Add

func (UnimplementedEventsServer) Get

type UnimplementedPOSSEServer

type UnimplementedPOSSEServer struct {
}

UnimplementedPOSSEServer must be embedded to have forward compatible implementations.

func (UnimplementedPOSSEServer) RefreshBlog

type UnimplementedSwitchTrackerServer

type UnimplementedSwitchTrackerServer struct {
}

UnimplementedSwitchTrackerServer must be embedded to have forward compatible implementations.

func (UnimplementedSwitchTrackerServer) GetSwitch

func (UnimplementedSwitchTrackerServer) ListSwitches

func (UnimplementedSwitchTrackerServer) Members

func (UnimplementedSwitchTrackerServer) Switch

func (UnimplementedSwitchTrackerServer) WhoIsFront

type UnsafeEventsServer

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

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

type UnsafePOSSEServer

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

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

type UnsafeSwitchTrackerServer

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

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

Jump to

Keyboard shortcuts

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