plots

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 28 Imported by: 2

Documentation

Overview

Package plots is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_plots_plots_proto protoreflect.FileDescriptor

Functions

func RegisterMruVPlotsServiceHandler

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

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

func RegisterMruVPlotsServiceHandlerClient

func RegisterMruVPlotsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MruVPlotsServiceClient) error

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

func RegisterMruVPlotsServiceHandlerFromEndpoint

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

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

func RegisterMruVPlotsServiceHandlerServer

func RegisterMruVPlotsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MruVPlotsServiceServer) error

RegisterMruVPlotsServiceHandlerServer registers the http handlers for service MruVPlotsService to "mux". UnaryRPC :call MruVPlotsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMruVPlotsServiceHandlerFromEndpoint instead.

func RegisterMruVPlotsServiceServer

func RegisterMruVPlotsServiceServer(s *grpc.Server, srv MruVPlotsServiceServer)

Types

type CreatePlotRequest

type CreatePlotRequest struct {
	Name        string             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string             `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Points      []*common.Position `protobuf:"bytes,3,rep,name=points,proto3" json:"points,omitempty"`
	// contains filtered or unexported fields
}

Request message for rpc `CreatePlot`.

func (*CreatePlotRequest) Descriptor deprecated

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

Deprecated: Use CreatePlotRequest.ProtoReflect.Descriptor instead.

func (*CreatePlotRequest) GetDescription

func (x *CreatePlotRequest) GetDescription() string

func (*CreatePlotRequest) GetName

func (x *CreatePlotRequest) GetName() string

func (*CreatePlotRequest) GetPoints

func (x *CreatePlotRequest) GetPoints() []*common.Position

func (*CreatePlotRequest) ProtoMessage

func (*CreatePlotRequest) ProtoMessage()

func (*CreatePlotRequest) ProtoReflect added in v0.8.4

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

func (*CreatePlotRequest) Reset

func (x *CreatePlotRequest) Reset()

func (*CreatePlotRequest) String

func (x *CreatePlotRequest) String() string

func (*CreatePlotRequest) Validate

func (m *CreatePlotRequest) Validate() error

Validate checks the field values on CreatePlotRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreatePlotRequestValidationError

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

CreatePlotRequestValidationError is the validation error returned by CreatePlotRequest.Validate if the designated constraints aren't met.

func (CreatePlotRequestValidationError) Cause

Cause function returns cause value.

func (CreatePlotRequestValidationError) Error

Error satisfies the builtin error interface

func (CreatePlotRequestValidationError) ErrorName

ErrorName returns error name.

func (CreatePlotRequestValidationError) Field

Field function returns field value.

func (CreatePlotRequestValidationError) Key

Key function returns key value.

func (CreatePlotRequestValidationError) Reason

Reason function returns reason value.

type CreatePlotResponse

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

Response message for rpc `CreatePlot`.

func (*CreatePlotResponse) Descriptor deprecated

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

Deprecated: Use CreatePlotResponse.ProtoReflect.Descriptor instead.

func (*CreatePlotResponse) GetId

func (x *CreatePlotResponse) GetId() uint32

func (*CreatePlotResponse) ProtoMessage

func (*CreatePlotResponse) ProtoMessage()

func (*CreatePlotResponse) ProtoReflect added in v0.8.4

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

func (*CreatePlotResponse) Reset

func (x *CreatePlotResponse) Reset()

func (*CreatePlotResponse) String

func (x *CreatePlotResponse) String() string

func (*CreatePlotResponse) Validate

func (m *CreatePlotResponse) Validate() error

Validate checks the field values on CreatePlotResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreatePlotResponseValidationError

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

CreatePlotResponseValidationError is the validation error returned by CreatePlotResponse.Validate if the designated constraints aren't met.

func (CreatePlotResponseValidationError) Cause

Cause function returns cause value.

func (CreatePlotResponseValidationError) Error

Error satisfies the builtin error interface

func (CreatePlotResponseValidationError) ErrorName

ErrorName returns error name.

func (CreatePlotResponseValidationError) Field

Field function returns field value.

func (CreatePlotResponseValidationError) Key

Key function returns key value.

func (CreatePlotResponseValidationError) Reason

Reason function returns reason value.

type DeletePlotRequest

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

Request message for rpc `DeletePlot`.

func (*DeletePlotRequest) Descriptor deprecated

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

Deprecated: Use DeletePlotRequest.ProtoReflect.Descriptor instead.

func (*DeletePlotRequest) GetId

func (x *DeletePlotRequest) GetId() uint32

func (*DeletePlotRequest) ProtoMessage

func (*DeletePlotRequest) ProtoMessage()

func (*DeletePlotRequest) ProtoReflect added in v0.8.4

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

func (*DeletePlotRequest) Reset

func (x *DeletePlotRequest) Reset()

func (*DeletePlotRequest) String

func (x *DeletePlotRequest) String() string

func (*DeletePlotRequest) Validate

func (m *DeletePlotRequest) Validate() error

Validate checks the field values on DeletePlotRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type DeletePlotRequestValidationError

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

DeletePlotRequestValidationError is the validation error returned by DeletePlotRequest.Validate if the designated constraints aren't met.

func (DeletePlotRequestValidationError) Cause

Cause function returns cause value.

func (DeletePlotRequestValidationError) Error

Error satisfies the builtin error interface

func (DeletePlotRequestValidationError) ErrorName

ErrorName returns error name.

func (DeletePlotRequestValidationError) Field

Field function returns field value.

func (DeletePlotRequestValidationError) Key

Key function returns key value.

func (DeletePlotRequestValidationError) Reason

Reason function returns reason value.

type DeletePlotResponse

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

Response message for rpc `DeletePlot`.

func (*DeletePlotResponse) Descriptor deprecated

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

Deprecated: Use DeletePlotResponse.ProtoReflect.Descriptor instead.

func (*DeletePlotResponse) ProtoMessage

func (*DeletePlotResponse) ProtoMessage()

func (*DeletePlotResponse) ProtoReflect added in v0.8.4

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

func (*DeletePlotResponse) Reset

func (x *DeletePlotResponse) Reset()

func (*DeletePlotResponse) String

func (x *DeletePlotResponse) String() string

func (*DeletePlotResponse) Validate

func (m *DeletePlotResponse) Validate() error

Validate checks the field values on DeletePlotResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type DeletePlotResponseValidationError

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

DeletePlotResponseValidationError is the validation error returned by DeletePlotResponse.Validate if the designated constraints aren't met.

func (DeletePlotResponseValidationError) Cause

Cause function returns cause value.

func (DeletePlotResponseValidationError) Error

Error satisfies the builtin error interface

func (DeletePlotResponseValidationError) ErrorName

ErrorName returns error name.

func (DeletePlotResponseValidationError) Field

Field function returns field value.

func (DeletePlotResponseValidationError) Key

Key function returns key value.

func (DeletePlotResponseValidationError) Reason

Reason function returns reason value.

type GetPlotRequest

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

Request message for rpc `GetPlot`.

func (*GetPlotRequest) Descriptor deprecated

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

Deprecated: Use GetPlotRequest.ProtoReflect.Descriptor instead.

func (*GetPlotRequest) GetId

func (x *GetPlotRequest) GetId() uint32

func (*GetPlotRequest) ProtoMessage

func (*GetPlotRequest) ProtoMessage()

func (*GetPlotRequest) ProtoReflect added in v0.8.4

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

func (*GetPlotRequest) Reset

func (x *GetPlotRequest) Reset()

func (*GetPlotRequest) String

func (x *GetPlotRequest) String() string

func (*GetPlotRequest) Validate

func (m *GetPlotRequest) Validate() error

Validate checks the field values on GetPlotRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetPlotRequestValidationError

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

GetPlotRequestValidationError is the validation error returned by GetPlotRequest.Validate if the designated constraints aren't met.

func (GetPlotRequestValidationError) Cause

Cause function returns cause value.

func (GetPlotRequestValidationError) Error

Error satisfies the builtin error interface

func (GetPlotRequestValidationError) ErrorName

func (e GetPlotRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetPlotRequestValidationError) Field

Field function returns field value.

func (GetPlotRequestValidationError) Key

Key function returns key value.

func (GetPlotRequestValidationError) Reason

Reason function returns reason value.

type GetPlotResponse

type GetPlotResponse struct {
	Name        string             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string             `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Points      []*common.Position `protobuf:"bytes,3,rep,name=points,proto3" json:"points,omitempty"`
	Area        float64            `protobuf:"fixed64,4,opt,name=area,proto3" json:"area,omitempty"`
	// contains filtered or unexported fields
}

Response message for rpc `GetPlot`.

func (*GetPlotResponse) Descriptor deprecated

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

Deprecated: Use GetPlotResponse.ProtoReflect.Descriptor instead.

func (*GetPlotResponse) GetArea

func (x *GetPlotResponse) GetArea() float64

func (*GetPlotResponse) GetDescription

func (x *GetPlotResponse) GetDescription() string

func (*GetPlotResponse) GetName

func (x *GetPlotResponse) GetName() string

func (*GetPlotResponse) GetPoints

func (x *GetPlotResponse) GetPoints() []*common.Position

func (*GetPlotResponse) ProtoMessage

func (*GetPlotResponse) ProtoMessage()

func (*GetPlotResponse) ProtoReflect added in v0.8.4

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

func (*GetPlotResponse) Reset

func (x *GetPlotResponse) Reset()

func (*GetPlotResponse) String

func (x *GetPlotResponse) String() string

func (*GetPlotResponse) Validate

func (m *GetPlotResponse) Validate() error

Validate checks the field values on GetPlotResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetPlotResponseValidationError

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

GetPlotResponseValidationError is the validation error returned by GetPlotResponse.Validate if the designated constraints aren't met.

func (GetPlotResponseValidationError) Cause

Cause function returns cause value.

func (GetPlotResponseValidationError) Error

Error satisfies the builtin error interface

func (GetPlotResponseValidationError) ErrorName

func (e GetPlotResponseValidationError) ErrorName() string

ErrorName returns error name.

func (GetPlotResponseValidationError) Field

Field function returns field value.

func (GetPlotResponseValidationError) Key

Key function returns key value.

func (GetPlotResponseValidationError) Reason

Reason function returns reason value.

type MruVPlotsServiceClient

type MruVPlotsServiceClient interface {
	// Create a plot.
	CreatePlot(ctx context.Context, in *CreatePlotRequest, opts ...grpc.CallOption) (*CreatePlotResponse, error)
	// Get a plot.
	GetPlot(ctx context.Context, in *GetPlotRequest, opts ...grpc.CallOption) (*GetPlotResponse, error)
	// Update a plot.
	UpdatePlot(ctx context.Context, in *UpdatePlotRequest, opts ...grpc.CallOption) (*UpdatePlotResponse, error)
	// Delete a plot.
	DeletePlot(ctx context.Context, in *DeletePlotRequest, opts ...grpc.CallOption) (*DeletePlotResponse, error)
}

MruVPlotsServiceClient is the client API for MruVPlotsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type MruVPlotsServiceServer

type MruVPlotsServiceServer interface {
	// Create a plot.
	CreatePlot(context.Context, *CreatePlotRequest) (*CreatePlotResponse, error)
	// Get a plot.
	GetPlot(context.Context, *GetPlotRequest) (*GetPlotResponse, error)
	// Update a plot.
	UpdatePlot(context.Context, *UpdatePlotRequest) (*UpdatePlotResponse, error)
	// Delete a plot.
	DeletePlot(context.Context, *DeletePlotRequest) (*DeletePlotResponse, error)
}

MruVPlotsServiceServer is the server API for MruVPlotsService service.

type Plot

type Plot struct {
	Name        string             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string             `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Points      []*common.Position `protobuf:"bytes,3,rep,name=points,proto3" json:"points,omitempty"`
	// contains filtered or unexported fields
}

func (*Plot) Descriptor deprecated

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

Deprecated: Use Plot.ProtoReflect.Descriptor instead.

func (*Plot) GetDescription

func (x *Plot) GetDescription() string

func (*Plot) GetName

func (x *Plot) GetName() string

func (*Plot) GetPoints

func (x *Plot) GetPoints() []*common.Position

func (*Plot) ProtoMessage

func (*Plot) ProtoMessage()

func (*Plot) ProtoReflect added in v0.8.4

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

func (*Plot) Reset

func (x *Plot) Reset()

func (*Plot) String

func (x *Plot) String() string

func (*Plot) Validate

func (m *Plot) Validate() error

Validate checks the field values on Plot with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PlotValidationError

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

PlotValidationError is the validation error returned by Plot.Validate if the designated constraints aren't met.

func (PlotValidationError) Cause

func (e PlotValidationError) Cause() error

Cause function returns cause value.

func (PlotValidationError) Error

func (e PlotValidationError) Error() string

Error satisfies the builtin error interface

func (PlotValidationError) ErrorName

func (e PlotValidationError) ErrorName() string

ErrorName returns error name.

func (PlotValidationError) Field

func (e PlotValidationError) Field() string

Field function returns field value.

func (PlotValidationError) Key

func (e PlotValidationError) Key() bool

Key function returns key value.

func (PlotValidationError) Reason

func (e PlotValidationError) Reason() string

Reason function returns reason value.

type UnimplementedMruVPlotsServiceServer

type UnimplementedMruVPlotsServiceServer struct {
}

UnimplementedMruVPlotsServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMruVPlotsServiceServer) CreatePlot

func (*UnimplementedMruVPlotsServiceServer) DeletePlot

func (*UnimplementedMruVPlotsServiceServer) GetPlot

func (*UnimplementedMruVPlotsServiceServer) UpdatePlot

type UpdatePlotRequest

type UpdatePlotRequest struct {
	Id          uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

Request message for rpc `UpdatePlot`.

func (*UpdatePlotRequest) Descriptor deprecated

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

Deprecated: Use UpdatePlotRequest.ProtoReflect.Descriptor instead.

func (*UpdatePlotRequest) GetDescription

func (x *UpdatePlotRequest) GetDescription() string

func (*UpdatePlotRequest) GetId

func (x *UpdatePlotRequest) GetId() uint32

func (*UpdatePlotRequest) GetName

func (x *UpdatePlotRequest) GetName() string

func (*UpdatePlotRequest) ProtoMessage

func (*UpdatePlotRequest) ProtoMessage()

func (*UpdatePlotRequest) ProtoReflect added in v0.8.4

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

func (*UpdatePlotRequest) Reset

func (x *UpdatePlotRequest) Reset()

func (*UpdatePlotRequest) String

func (x *UpdatePlotRequest) String() string

func (*UpdatePlotRequest) Validate

func (m *UpdatePlotRequest) Validate() error

Validate checks the field values on UpdatePlotRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpdatePlotRequestValidationError

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

UpdatePlotRequestValidationError is the validation error returned by UpdatePlotRequest.Validate if the designated constraints aren't met.

func (UpdatePlotRequestValidationError) Cause

Cause function returns cause value.

func (UpdatePlotRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdatePlotRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdatePlotRequestValidationError) Field

Field function returns field value.

func (UpdatePlotRequestValidationError) Key

Key function returns key value.

func (UpdatePlotRequestValidationError) Reason

Reason function returns reason value.

type UpdatePlotResponse

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

Response message for rpc `UpdatePlot`.

func (*UpdatePlotResponse) Descriptor deprecated

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

Deprecated: Use UpdatePlotResponse.ProtoReflect.Descriptor instead.

func (*UpdatePlotResponse) ProtoMessage

func (*UpdatePlotResponse) ProtoMessage()

func (*UpdatePlotResponse) ProtoReflect added in v0.8.4

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

func (*UpdatePlotResponse) Reset

func (x *UpdatePlotResponse) Reset()

func (*UpdatePlotResponse) String

func (x *UpdatePlotResponse) String() string

func (*UpdatePlotResponse) Validate

func (m *UpdatePlotResponse) Validate() error

Validate checks the field values on UpdatePlotResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpdatePlotResponseValidationError

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

UpdatePlotResponseValidationError is the validation error returned by UpdatePlotResponse.Validate if the designated constraints aren't met.

func (UpdatePlotResponseValidationError) Cause

Cause function returns cause value.

func (UpdatePlotResponseValidationError) Error

Error satisfies the builtin error interface

func (UpdatePlotResponseValidationError) ErrorName

ErrorName returns error name.

func (UpdatePlotResponseValidationError) Field

Field function returns field value.

func (UpdatePlotResponseValidationError) Key

Key function returns key value.

func (UpdatePlotResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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