v1beta1

package
v0.0.0-...-8ac8335 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1beta1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterConservationServiceHandler

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

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

func RegisterConservationServiceHandlerClient

func RegisterConservationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConservationServiceClient) error

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

func RegisterConservationServiceHandlerFromEndpoint

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

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

func RegisterConservationServiceServer

func RegisterConservationServiceServer(s *grpc.Server, srv ConservationServiceServer)

Types

type Conservation

type Conservation struct {
	// database unique identifier
	ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// creation date (timestamp without time zone)
	Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	// number of sent email to keep
	Sent int64 `protobuf:"varint,3,opt,name=sent,proto3" json:"sent,omitempty"`
	// number of unsent email to keep
	Unsent int64 `protobuf:"varint,4,opt,name=unsent,proto3" json:"unsent,omitempty"`
	// keep email content (depend of country law)
	KeepEmailContent     bool     `protobuf:"varint,5,opt,name=keep_email_content,json=keepEmailContent,proto3" json:"keep_email_content,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Conservation is database representation

func (*Conservation) Descriptor

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

func (*Conservation) GetCreated

func (m *Conservation) GetCreated() string

func (*Conservation) GetID

func (m *Conservation) GetID() int64

func (*Conservation) GetKeepEmailContent

func (m *Conservation) GetKeepEmailContent() bool

func (*Conservation) GetSent

func (m *Conservation) GetSent() int64

func (*Conservation) GetUnsent

func (m *Conservation) GetUnsent() int64

func (*Conservation) ProtoMessage

func (*Conservation) ProtoMessage()

func (*Conservation) Reset

func (m *Conservation) Reset()

func (*Conservation) String

func (m *Conservation) String() string

func (*Conservation) XXX_DiscardUnknown

func (m *Conservation) XXX_DiscardUnknown()

func (*Conservation) XXX_Marshal

func (m *Conservation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Conservation) XXX_Merge

func (m *Conservation) XXX_Merge(src proto.Message)

func (*Conservation) XXX_Size

func (m *Conservation) XXX_Size() int

func (*Conservation) XXX_Unmarshal

func (m *Conservation) XXX_Unmarshal(b []byte) error

type ConservationServiceClient

type ConservationServiceClient interface {
	// ListConservation returns a stream of List of Conservation
	ListConservation(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (ConservationService_ListConservationClient, error)
	// CreateConservation insert a conservation in dataset
	CreateConservation(ctx context.Context, in *Conservation, opts ...grpc.CallOption) (*Conservation, error)
}

ConservationServiceClient is the client API for ConservationService service.

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

func NewConservationServiceClient

func NewConservationServiceClient(cc *grpc.ClientConn) ConservationServiceClient

type ConservationServiceServer

type ConservationServiceServer interface {
	// ListConservation returns a stream of List of Conservation
	ListConservation(*empty.Empty, ConservationService_ListConservationServer) error
	// CreateConservation insert a conservation in dataset
	CreateConservation(context.Context, *Conservation) (*Conservation, error)
}

ConservationServiceServer is the server API for ConservationService service.

type ConservationService_ListConservationClient

type ConservationService_ListConservationClient interface {
	Recv() (*Conservation, error)
	grpc.ClientStream
}

type ConservationService_ListConservationServer

type ConservationService_ListConservationServer interface {
	Send(*Conservation) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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