todo

package
v0.0.0-...-34af5e3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 License: MIT Imports: 17 Imported by: 2

Documentation

Overview

Package todo is a generated protocol buffer package.

It is generated from these files:
	github.com/abronan/todo-grpc/api/todo/v1/todo.proto

It has these top-level messages:
	Todo
	CreateTodoRequest
	CreateTodoResponse
	CreateTodosRequest
	CreateTodosResponse
	GetTodoRequest
	GetTodoResponse
	ListTodoRequest
	ListTodoResponse
	DeleteTodoRequest
	DeleteTodoResponse
	UpdateTodoRequest
	UpdateTodoResponse
	UpdateTodosRequest
	UpdateTodosResponse

Package todo is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTodo = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTodo   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterTodoServiceHandler

func RegisterTodoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTodoServiceHandler registers the http handlers for service TodoService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTodoServiceHandlerClient

func RegisterTodoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TodoServiceClient) error

RegisterTodoServiceHandler registers the http handlers for service TodoService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TodoServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TodoServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TodoServiceClient" to call the correct interceptors.

func RegisterTodoServiceHandlerFromEndpoint

func RegisterTodoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTodoServiceHandlerFromEndpoint is same as RegisterTodoServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTodoServiceServer

func RegisterTodoServiceServer(s *grpc.Server, srv TodoServiceServer)

Types

type CreateTodoRequest

type CreateTodoRequest struct {
	Item *Todo `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}

func (*CreateTodoRequest) Descriptor

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

func (*CreateTodoRequest) Marshal

func (m *CreateTodoRequest) Marshal() (dAtA []byte, err error)

func (*CreateTodoRequest) MarshalTo

func (m *CreateTodoRequest) MarshalTo(dAtA []byte) (int, error)

func (*CreateTodoRequest) ProtoMessage

func (*CreateTodoRequest) ProtoMessage()

func (*CreateTodoRequest) Reset

func (m *CreateTodoRequest) Reset()

func (*CreateTodoRequest) Size

func (m *CreateTodoRequest) Size() (n int)

func (*CreateTodoRequest) String

func (this *CreateTodoRequest) String() string

func (*CreateTodoRequest) Unmarshal

func (m *CreateTodoRequest) Unmarshal(dAtA []byte) error

type CreateTodoResponse

type CreateTodoResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*CreateTodoResponse) Descriptor

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

func (*CreateTodoResponse) Marshal

func (m *CreateTodoResponse) Marshal() (dAtA []byte, err error)

func (*CreateTodoResponse) MarshalTo

func (m *CreateTodoResponse) MarshalTo(dAtA []byte) (int, error)

func (*CreateTodoResponse) ProtoMessage

func (*CreateTodoResponse) ProtoMessage()

func (*CreateTodoResponse) Reset

func (m *CreateTodoResponse) Reset()

func (*CreateTodoResponse) Size

func (m *CreateTodoResponse) Size() (n int)

func (*CreateTodoResponse) String

func (this *CreateTodoResponse) String() string

func (*CreateTodoResponse) Unmarshal

func (m *CreateTodoResponse) Unmarshal(dAtA []byte) error

type CreateTodosRequest

type CreateTodosRequest struct {
	Items []*Todo `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*CreateTodosRequest) Descriptor

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

func (*CreateTodosRequest) Marshal

func (m *CreateTodosRequest) Marshal() (dAtA []byte, err error)

func (*CreateTodosRequest) MarshalTo

func (m *CreateTodosRequest) MarshalTo(dAtA []byte) (int, error)

func (*CreateTodosRequest) ProtoMessage

func (*CreateTodosRequest) ProtoMessage()

func (*CreateTodosRequest) Reset

func (m *CreateTodosRequest) Reset()

func (*CreateTodosRequest) Size

func (m *CreateTodosRequest) Size() (n int)

func (*CreateTodosRequest) String

func (this *CreateTodosRequest) String() string

func (*CreateTodosRequest) Unmarshal

func (m *CreateTodosRequest) Unmarshal(dAtA []byte) error

type CreateTodosResponse

type CreateTodosResponse struct {
	Ids []string `protobuf:"bytes,1,rep,name=ids" json:"ids,omitempty"`
}

func (*CreateTodosResponse) Descriptor

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

func (*CreateTodosResponse) Marshal

func (m *CreateTodosResponse) Marshal() (dAtA []byte, err error)

func (*CreateTodosResponse) MarshalTo

func (m *CreateTodosResponse) MarshalTo(dAtA []byte) (int, error)

func (*CreateTodosResponse) ProtoMessage

func (*CreateTodosResponse) ProtoMessage()

func (*CreateTodosResponse) Reset

func (m *CreateTodosResponse) Reset()

func (*CreateTodosResponse) Size

func (m *CreateTodosResponse) Size() (n int)

func (*CreateTodosResponse) String

func (this *CreateTodosResponse) String() string

func (*CreateTodosResponse) Unmarshal

func (m *CreateTodosResponse) Unmarshal(dAtA []byte) error

type DeleteTodoRequest

type DeleteTodoRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*DeleteTodoRequest) Descriptor

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

func (*DeleteTodoRequest) Marshal

func (m *DeleteTodoRequest) Marshal() (dAtA []byte, err error)

func (*DeleteTodoRequest) MarshalTo

func (m *DeleteTodoRequest) MarshalTo(dAtA []byte) (int, error)

func (*DeleteTodoRequest) ProtoMessage

func (*DeleteTodoRequest) ProtoMessage()

func (*DeleteTodoRequest) Reset

func (m *DeleteTodoRequest) Reset()

func (*DeleteTodoRequest) Size

func (m *DeleteTodoRequest) Size() (n int)

func (*DeleteTodoRequest) String

func (this *DeleteTodoRequest) String() string

func (*DeleteTodoRequest) Unmarshal

func (m *DeleteTodoRequest) Unmarshal(dAtA []byte) error

type DeleteTodoResponse

type DeleteTodoResponse struct {
}

func (*DeleteTodoResponse) Descriptor

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

func (*DeleteTodoResponse) Marshal

func (m *DeleteTodoResponse) Marshal() (dAtA []byte, err error)

func (*DeleteTodoResponse) MarshalTo

func (m *DeleteTodoResponse) MarshalTo(dAtA []byte) (int, error)

func (*DeleteTodoResponse) ProtoMessage

func (*DeleteTodoResponse) ProtoMessage()

func (*DeleteTodoResponse) Reset

func (m *DeleteTodoResponse) Reset()

func (*DeleteTodoResponse) Size

func (m *DeleteTodoResponse) Size() (n int)

func (*DeleteTodoResponse) String

func (this *DeleteTodoResponse) String() string

func (*DeleteTodoResponse) Unmarshal

func (m *DeleteTodoResponse) Unmarshal(dAtA []byte) error

type GetTodoRequest

type GetTodoRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*GetTodoRequest) Descriptor

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

func (*GetTodoRequest) Marshal

func (m *GetTodoRequest) Marshal() (dAtA []byte, err error)

func (*GetTodoRequest) MarshalTo

func (m *GetTodoRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetTodoRequest) ProtoMessage

func (*GetTodoRequest) ProtoMessage()

func (*GetTodoRequest) Reset

func (m *GetTodoRequest) Reset()

func (*GetTodoRequest) Size

func (m *GetTodoRequest) Size() (n int)

func (*GetTodoRequest) String

func (this *GetTodoRequest) String() string

func (*GetTodoRequest) Unmarshal

func (m *GetTodoRequest) Unmarshal(dAtA []byte) error

type GetTodoResponse

type GetTodoResponse struct {
	Item *Todo `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}

func (*GetTodoResponse) Descriptor

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

func (*GetTodoResponse) Marshal

func (m *GetTodoResponse) Marshal() (dAtA []byte, err error)

func (*GetTodoResponse) MarshalTo

func (m *GetTodoResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetTodoResponse) ProtoMessage

func (*GetTodoResponse) ProtoMessage()

func (*GetTodoResponse) Reset

func (m *GetTodoResponse) Reset()

func (*GetTodoResponse) Size

func (m *GetTodoResponse) Size() (n int)

func (*GetTodoResponse) String

func (this *GetTodoResponse) String() string

func (*GetTodoResponse) Unmarshal

func (m *GetTodoResponse) Unmarshal(dAtA []byte) error

type ListTodoRequest

type ListTodoRequest struct {
	Limit        int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	NotCompleted bool  `protobuf:"varint,2,opt,name=not_completed,json=notCompleted,proto3" json:"not_completed,omitempty"`
}

func (*ListTodoRequest) Descriptor

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

func (*ListTodoRequest) Marshal

func (m *ListTodoRequest) Marshal() (dAtA []byte, err error)

func (*ListTodoRequest) MarshalTo

func (m *ListTodoRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListTodoRequest) ProtoMessage

func (*ListTodoRequest) ProtoMessage()

func (*ListTodoRequest) Reset

func (m *ListTodoRequest) Reset()

func (*ListTodoRequest) Size

func (m *ListTodoRequest) Size() (n int)

func (*ListTodoRequest) String

func (this *ListTodoRequest) String() string

func (*ListTodoRequest) Unmarshal

func (m *ListTodoRequest) Unmarshal(dAtA []byte) error

type ListTodoResponse

type ListTodoResponse struct {
	Items []*Todo `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*ListTodoResponse) Descriptor

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

func (*ListTodoResponse) Marshal

func (m *ListTodoResponse) Marshal() (dAtA []byte, err error)

func (*ListTodoResponse) MarshalTo

func (m *ListTodoResponse) MarshalTo(dAtA []byte) (int, error)

func (*ListTodoResponse) ProtoMessage

func (*ListTodoResponse) ProtoMessage()

func (*ListTodoResponse) Reset

func (m *ListTodoResponse) Reset()

func (*ListTodoResponse) Size

func (m *ListTodoResponse) Size() (n int)

func (*ListTodoResponse) String

func (this *ListTodoResponse) String() string

func (*ListTodoResponse) Unmarshal

func (m *ListTodoResponse) Unmarshal(dAtA []byte) error

type Todo

type Todo struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Title       string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// @inject_tag: sql:",notnull,default:false"
	Completed bool `protobuf:"varint,4,opt,name=completed,proto3" json:"completed,omitempty" sql:",notnull,default:false"`
	// @inject_tag: sql:"type:timestamptz,default:now()"
	CreatedAt *google_protobuf1.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt" json:"created_at,omitempty" sql:"type:timestamptz,default:now()"`
	// @inject_tag: sql:"type:timestamptz"
	UpdatedAt *google_protobuf1.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty" sql:"type:timestamptz"`
}

func (*Todo) Descriptor

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

func (*Todo) Marshal

func (m *Todo) Marshal() (dAtA []byte, err error)

func (*Todo) MarshalTo

func (m *Todo) MarshalTo(dAtA []byte) (int, error)

func (*Todo) ProtoMessage

func (*Todo) ProtoMessage()

func (*Todo) Reset

func (m *Todo) Reset()

func (*Todo) Size

func (m *Todo) Size() (n int)

func (*Todo) String

func (this *Todo) String() string

func (*Todo) Unmarshal

func (m *Todo) Unmarshal(dAtA []byte) error

type TodoServiceClient

type TodoServiceClient interface {
	CreateTodo(ctx context.Context, in *CreateTodoRequest, opts ...grpc.CallOption) (*CreateTodoResponse, error)
	// Bulk version of CreateTodo
	CreateTodos(ctx context.Context, in *CreateTodosRequest, opts ...grpc.CallOption) (*CreateTodosResponse, error)
	GetTodo(ctx context.Context, in *GetTodoRequest, opts ...grpc.CallOption) (*GetTodoResponse, error)
	ListTodo(ctx context.Context, in *ListTodoRequest, opts ...grpc.CallOption) (*ListTodoResponse, error)
	DeleteTodo(ctx context.Context, in *DeleteTodoRequest, opts ...grpc.CallOption) (*DeleteTodoResponse, error)
	UpdateTodo(ctx context.Context, in *UpdateTodoRequest, opts ...grpc.CallOption) (*UpdateTodoResponse, error)
	UpdateTodos(ctx context.Context, in *UpdateTodosRequest, opts ...grpc.CallOption) (*UpdateTodosResponse, error)
}

func NewTodoServiceClient

func NewTodoServiceClient(cc *grpc.ClientConn) TodoServiceClient

type UpdateTodoRequest

type UpdateTodoRequest struct {
	Item *Todo `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}

func (*UpdateTodoRequest) Descriptor

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

func (*UpdateTodoRequest) Marshal

func (m *UpdateTodoRequest) Marshal() (dAtA []byte, err error)

func (*UpdateTodoRequest) MarshalTo

func (m *UpdateTodoRequest) MarshalTo(dAtA []byte) (int, error)

func (*UpdateTodoRequest) ProtoMessage

func (*UpdateTodoRequest) ProtoMessage()

func (*UpdateTodoRequest) Reset

func (m *UpdateTodoRequest) Reset()

func (*UpdateTodoRequest) Size

func (m *UpdateTodoRequest) Size() (n int)

func (*UpdateTodoRequest) String

func (this *UpdateTodoRequest) String() string

func (*UpdateTodoRequest) Unmarshal

func (m *UpdateTodoRequest) Unmarshal(dAtA []byte) error

type UpdateTodoResponse

type UpdateTodoResponse struct {
}

func (*UpdateTodoResponse) Descriptor

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

func (*UpdateTodoResponse) Marshal

func (m *UpdateTodoResponse) Marshal() (dAtA []byte, err error)

func (*UpdateTodoResponse) MarshalTo

func (m *UpdateTodoResponse) MarshalTo(dAtA []byte) (int, error)

func (*UpdateTodoResponse) ProtoMessage

func (*UpdateTodoResponse) ProtoMessage()

func (*UpdateTodoResponse) Reset

func (m *UpdateTodoResponse) Reset()

func (*UpdateTodoResponse) Size

func (m *UpdateTodoResponse) Size() (n int)

func (*UpdateTodoResponse) String

func (this *UpdateTodoResponse) String() string

func (*UpdateTodoResponse) Unmarshal

func (m *UpdateTodoResponse) Unmarshal(dAtA []byte) error

type UpdateTodosRequest

type UpdateTodosRequest struct {
	Items []*Todo `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*UpdateTodosRequest) Descriptor

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

func (*UpdateTodosRequest) Marshal

func (m *UpdateTodosRequest) Marshal() (dAtA []byte, err error)

func (*UpdateTodosRequest) MarshalTo

func (m *UpdateTodosRequest) MarshalTo(dAtA []byte) (int, error)

func (*UpdateTodosRequest) ProtoMessage

func (*UpdateTodosRequest) ProtoMessage()

func (*UpdateTodosRequest) Reset

func (m *UpdateTodosRequest) Reset()

func (*UpdateTodosRequest) Size

func (m *UpdateTodosRequest) Size() (n int)

func (*UpdateTodosRequest) String

func (this *UpdateTodosRequest) String() string

func (*UpdateTodosRequest) Unmarshal

func (m *UpdateTodosRequest) Unmarshal(dAtA []byte) error

type UpdateTodosResponse

type UpdateTodosResponse struct {
}

func (*UpdateTodosResponse) Descriptor

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

func (*UpdateTodosResponse) Marshal

func (m *UpdateTodosResponse) Marshal() (dAtA []byte, err error)

func (*UpdateTodosResponse) MarshalTo

func (m *UpdateTodosResponse) MarshalTo(dAtA []byte) (int, error)

func (*UpdateTodosResponse) ProtoMessage

func (*UpdateTodosResponse) ProtoMessage()

func (*UpdateTodosResponse) Reset

func (m *UpdateTodosResponse) Reset()

func (*UpdateTodosResponse) Size

func (m *UpdateTodosResponse) Size() (n int)

func (*UpdateTodosResponse) String

func (this *UpdateTodosResponse) String() string

func (*UpdateTodosResponse) Unmarshal

func (m *UpdateTodosResponse) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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