server

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeEchoerRequest

func DecodeEchoerRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeHistoryRequest

func DecodeHistoryRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeListenerRequest

func DecodeListenerRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeLoginRequest

func DecodeLoginRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeSubscribeRequest

func DecodeSubscribeRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeSummaryRequest

func DecodeSummaryRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func EncodeEchoerResponse

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

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

func EncodeHistoryResponse

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

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

func EncodeListenerResponse

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

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

func EncodeLoginResponse

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

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

func EncodeSubscribeResponse

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

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

func EncodeSummaryResponse

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

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

func NewChatSummaryCollection

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

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 NewEchoerResponse

func NewEchoerResponse(result string) *chatterpb.EchoerResponse

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

func NewEchoerStreamingRequest

func NewEchoerStreamingRequest(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 NewHistoryResponse

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

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

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 NewListenerResponse

func NewListenerResponse() *chatterpb.ListenerResponse

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

func NewListenerStreamingRequest

func NewListenerStreamingRequest(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 NewLoginResponse

func NewLoginResponse(result string) *chatterpb.LoginResponse

NewLoginResponse builds the gRPC response type from the result of the "login" 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 NewSubscribeResponse

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

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

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 NewSummaryStreamingRequest

func NewSummaryStreamingRequest(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 ErrorNamer

type ErrorNamer interface {
	ErrorName() string
}

ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the expr.

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

type Server struct {
	LoginH     goagrpc.UnaryHandler
	EchoerH    goagrpc.StreamHandler
	ListenerH  goagrpc.StreamHandler
	SummaryH   goagrpc.StreamHandler
	SubscribeH goagrpc.StreamHandler
	HistoryH   goagrpc.StreamHandler
}

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