server

package
v0.0.0-...-5a969d9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeEchoerRequest

func DecodeEchoerRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeEchoerRequest decodes requests sent to "chatter" service "echoer" endpoint.

func DecodeHistoryRequest

func DecodeHistoryRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeHistoryRequest decodes requests sent to "chatter" service "history" endpoint.

func DecodeListenerRequest

func DecodeListenerRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeListenerRequest decodes requests sent to "chatter" service "listener" endpoint.

func DecodeLoginRequest

func DecodeLoginRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeLoginRequest decodes requests sent to "chatter" service "login" endpoint.

func DecodeSubscribeRequest

func DecodeSubscribeRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeSubscribeRequest decodes requests sent to "chatter" service "subscribe" endpoint.

func DecodeSummaryRequest

func DecodeSummaryRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeSummaryRequest decodes requests sent to "chatter" service "summary" endpoint.

func EncodeEchoerResponse

func EncodeEchoerResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeEchoerResponse encodes responses from the "chatter" service "echoer" endpoint.

func EncodeHistoryResponse

func EncodeHistoryResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeHistoryResponse encodes responses from the "chatter" service "history" endpoint.

func EncodeListenerResponse

func EncodeListenerResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeListenerResponse encodes responses from the "chatter" service "listener" endpoint.

func EncodeLoginResponse

func EncodeLoginResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeLoginResponse encodes responses from the "chatter" service "login" endpoint.

func EncodeSubscribeResponse

func EncodeSubscribeResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeSubscribeResponse encodes responses from the "chatter" service "subscribe" endpoint.

func EncodeSummaryResponse

func EncodeSummaryResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeSummaryResponse encodes responses from the "chatter" service "summary" endpoint.

func NewEchoerHandler

func NewEchoerHandler(endpoint goa.Endpoint, h goagrpc.StreamHandler) goagrpc.StreamHandler

NewEchoerHandler creates a gRPC handler which serves the "chatter" service "echoer" endpoint.

func NewEchoerPayload

func NewEchoerPayload(token string) *chatter.EchoerPayload

NewEchoerPayload builds the payload of the "echoer" endpoint of the "chatter" service from the gRPC request type.

func NewEchoerStreamingRequestEchoerStreamingRequest

func NewEchoerStreamingRequestEchoerStreamingRequest(v *chatterpb.EchoerStreamingRequest) string

func NewHistoryHandler

func NewHistoryHandler(endpoint goa.Endpoint, h goagrpc.StreamHandler) goagrpc.StreamHandler

NewHistoryHandler creates a gRPC handler which serves the "chatter" service "history" endpoint.

func NewHistoryPayload

func NewHistoryPayload(view *string, token string) *chatter.HistoryPayload

NewHistoryPayload builds the payload of the "history" endpoint of the "chatter" service from the gRPC request type.

func NewListenerHandler

func NewListenerHandler(endpoint goa.Endpoint, h goagrpc.StreamHandler) goagrpc.StreamHandler

NewListenerHandler creates a gRPC handler which serves the "chatter" service "listener" endpoint.

func NewListenerPayload

func NewListenerPayload(token string) *chatter.ListenerPayload

NewListenerPayload builds the payload of the "listener" endpoint of the "chatter" service from the gRPC request type.

func NewListenerStreamingRequestListenerStreamingRequest

func NewListenerStreamingRequestListenerStreamingRequest(v *chatterpb.ListenerStreamingRequest) string

func NewLoginHandler

func NewLoginHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler

NewLoginHandler creates a gRPC handler which serves the "chatter" service "login" endpoint.

func NewLoginPayload

func NewLoginPayload(user string, password string) *chatter.LoginPayload

NewLoginPayload builds the payload of the "login" endpoint of the "chatter" service from the gRPC request type.

func NewProtoChatSummaryCollection

func NewProtoChatSummaryCollection(result chatterviews.ChatSummaryCollectionView) *chatterpb.ChatSummaryCollection

NewProtoChatSummaryCollection builds the gRPC response type from the result of the "summary" endpoint of the "chatter" service.

func NewProtoChatSummaryCollectionViewChatSummaryCollection

func NewProtoChatSummaryCollectionViewChatSummaryCollection(vresult chatterviews.ChatSummaryCollectionView) *chatterpb.ChatSummaryCollection

func NewProtoChatSummaryViewHistoryResponse

func NewProtoChatSummaryViewHistoryResponse(vresult *chatterviews.ChatSummaryView) *chatterpb.HistoryResponse

func NewProtoEchoerResponse

func NewProtoEchoerResponse(result string) *chatterpb.EchoerResponse

NewProtoEchoerResponse builds the gRPC response type from the result of the "echoer" endpoint of the "chatter" service.

func NewProtoEventSubscribeResponse

func NewProtoEventSubscribeResponse(result *chatter.Event) *chatterpb.SubscribeResponse

func NewProtoHistoryResponse

func NewProtoHistoryResponse(result *chatterviews.ChatSummaryView) *chatterpb.HistoryResponse

NewProtoHistoryResponse builds the gRPC response type from the result of the "history" endpoint of the "chatter" service.

func NewProtoListenerResponse

func NewProtoListenerResponse() *chatterpb.ListenerResponse

NewProtoListenerResponse builds the gRPC response type from the result of the "listener" endpoint of the "chatter" service.

func NewProtoLoginResponse

func NewProtoLoginResponse(result string) *chatterpb.LoginResponse

NewProtoLoginResponse builds the gRPC response type from the result of the "login" endpoint of the "chatter" service.

func NewProtoSubscribeResponse

func NewProtoSubscribeResponse(result *chatter.Event) *chatterpb.SubscribeResponse

NewProtoSubscribeResponse builds the gRPC response type from the result of the "subscribe" endpoint of the "chatter" service.

func NewSubscribeHandler

func NewSubscribeHandler(endpoint goa.Endpoint, h goagrpc.StreamHandler) goagrpc.StreamHandler

NewSubscribeHandler creates a gRPC handler which serves the "chatter" service "subscribe" endpoint.

func NewSubscribePayload

func NewSubscribePayload(token string) *chatter.SubscribePayload

NewSubscribePayload builds the payload of the "subscribe" endpoint of the "chatter" service from the gRPC request type.

func NewSummaryHandler

func NewSummaryHandler(endpoint goa.Endpoint, h goagrpc.StreamHandler) goagrpc.StreamHandler

NewSummaryHandler creates a gRPC handler which serves the "chatter" service "summary" endpoint.

func NewSummaryPayload

func NewSummaryPayload(token string) *chatter.SummaryPayload

NewSummaryPayload builds the payload of the "summary" endpoint of the "chatter" service from the gRPC request type.

func NewSummaryStreamingRequestSummaryStreamingRequest

func NewSummaryStreamingRequestSummaryStreamingRequest(v *chatterpb.SummaryStreamingRequest) string

Types

type EchoerServerStream

type EchoerServerStream struct {
	// contains filtered or unexported fields
}

EchoerServerStream implements the chatter.EchoerServerStream interface.

func (*EchoerServerStream) Close

func (s *EchoerServerStream) Close() error

func (*EchoerServerStream) Recv

func (s *EchoerServerStream) Recv() (string, error)

Recv reads instances of "chatterpb.EchoerStreamingRequest" from the "echoer" endpoint gRPC stream.

func (*EchoerServerStream) Send

func (s *EchoerServerStream) Send(res string) error

Send streams instances of "chatterpb.EchoerResponse" to the "echoer" endpoint gRPC stream.

type HistoryServerStream

type HistoryServerStream struct {
	// contains filtered or unexported fields
}

HistoryServerStream implements the chatter.HistoryServerStream interface.

func (*HistoryServerStream) Close

func (s *HistoryServerStream) Close() error

func (*HistoryServerStream) Send

Send streams instances of "chatterpb.HistoryResponse" to the "history" endpoint gRPC stream.

func (*HistoryServerStream) SetView

func (s *HistoryServerStream) SetView(view string)

SetView sets the view.

type ListenerServerStream

type ListenerServerStream struct {
	// contains filtered or unexported fields
}

ListenerServerStream implements the chatter.ListenerServerStream interface.

func (*ListenerServerStream) Close

func (s *ListenerServerStream) Close() error

func (*ListenerServerStream) Recv

func (s *ListenerServerStream) Recv() (string, error)

Recv reads instances of "chatterpb.ListenerStreamingRequest" from the "listener" endpoint gRPC stream.

type Server

Server implements the chatterpb.ChatterServer interface.

func New

New instantiates the server struct with the chatter service endpoints.

func (*Server) Echoer

func (s *Server) Echoer(stream chatterpb.Chatter_EchoerServer) error

Echoer implements the "Echoer" method in chatterpb.ChatterServer interface.

func (*Server) History

func (s *Server) History(message *chatterpb.HistoryRequest, stream chatterpb.Chatter_HistoryServer) error

History implements the "History" method in chatterpb.ChatterServer interface.

func (*Server) Listener

func (s *Server) Listener(stream chatterpb.Chatter_ListenerServer) error

Listener implements the "Listener" method in chatterpb.ChatterServer interface.

func (*Server) Login

Login implements the "Login" method in chatterpb.ChatterServer interface.

func (*Server) Subscribe

Subscribe implements the "Subscribe" method in chatterpb.ChatterServer interface.

func (*Server) Summary

func (s *Server) Summary(stream chatterpb.Chatter_SummaryServer) error

Summary implements the "Summary" method in chatterpb.ChatterServer interface.

type SubscribeServerStream

type SubscribeServerStream struct {
	// contains filtered or unexported fields
}

SubscribeServerStream implements the chatter.SubscribeServerStream interface.

func (*SubscribeServerStream) Close

func (s *SubscribeServerStream) Close() error

func (*SubscribeServerStream) Send

func (s *SubscribeServerStream) Send(res *chatter.Event) error

Send streams instances of "chatterpb.SubscribeResponse" to the "subscribe" endpoint gRPC stream.

type SummaryServerStream

type SummaryServerStream struct {
	// contains filtered or unexported fields
}

SummaryServerStream implements the chatter.SummaryServerStream interface.

func (*SummaryServerStream) Recv

func (s *SummaryServerStream) Recv() (string, error)

Recv reads instances of "chatterpb.SummaryStreamingRequest" from the "summary" endpoint gRPC stream.

func (*SummaryServerStream) SendAndClose

SendAndClose streams instances of "chatterpb.ChatSummaryCollection" to the "summary" endpoint gRPC stream.

Jump to

Keyboard shortcuts

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