exampleproto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

DO NOT EDIT: Client was generated from 'example.proto'

DO NOT EDIT: Router was generated from 'example.proto'

Index

Constants

This section is empty.

Variables

View Source
var File_example_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Client

type Client interface {
	Do(context.Context, *DoRequest, ...awsreq.Option) (*DoResponse, error)
}

Client is a generated client for the service defined in 'Service'. It exposes methods to call procedures available on the service, and handles the packing and unpacking of requests and responses for transport.

func NewClient

func NewClient(i invoker.LambdaInvoker, arn string, unmarshaler func(json.RawMessage) error) Client

NewClient initializes a Client, configuring it to use the provided unmarshaler for unpacking errors to the error implementation of your choice.

type DoRequest

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

func (*DoRequest) Descriptor deprecated

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

Deprecated: Use DoRequest.ProtoReflect.Descriptor instead.

func (*DoRequest) GetId

func (x *DoRequest) GetId() string

func (*DoRequest) ProtoMessage

func (*DoRequest) ProtoMessage()

func (*DoRequest) ProtoReflect

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

func (*DoRequest) Reset

func (x *DoRequest) Reset()

func (*DoRequest) String

func (x *DoRequest) String() string

type DoResponse

type DoResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*DoResponse) Descriptor deprecated

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

Deprecated: Use DoResponse.ProtoReflect.Descriptor instead.

func (*DoResponse) GetSuccess

func (x *DoResponse) GetSuccess() bool

func (*DoResponse) ProtoMessage

func (*DoResponse) ProtoMessage()

func (*DoResponse) ProtoReflect

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

func (*DoResponse) Reset

func (x *DoResponse) Reset()

func (*DoResponse) String

func (x *DoResponse) String() string

type Handler

type Handler interface {
	Do(context.Context, *DoRequest) (*DoResponse, error)
}

Handler is the exported interface you should implement to handle requests in your service.

type Router

type Router struct {
	*router.Router
}

Router wraps the 'lambda-router', you should pass Router.Handle to lambda.Start when initializing your lambda function.

func NewRouter

func NewRouter(handler Handler, marshaler func(error) (json.RawMessage, error)) *Router

NewRouter initializes a router which will route requests to the handler provided. It will use the marshaler provided to pack errors for transport.

Jump to

Keyboard shortcuts

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