v2

package
v0.0.0-...-3495977 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 18 Imported by: 3

Documentation

Overview

Package v2 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Principal_Type_name = map[int32]string{
		0: "USER",
	}
	Principal_Type_value = map[string]int32{
		"USER": 0,
	}
)

Enum value maps for Principal_Type.

View Source
var File_notebook_proto protoreflect.FileDescriptor

Functions

func RegisterNotebookHandler

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

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

func RegisterNotebookHandlerClient

func RegisterNotebookHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotebookClient) error

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

func RegisterNotebookHandlerFromEndpoint

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

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

func RegisterNotebookHandlerServer

func RegisterNotebookHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NotebookServer) error

RegisterNotebookHandlerServer registers the http handlers for service Notebook to "mux". UnaryRPC :call NotebookServer 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 RegisterNotebookHandlerFromEndpoint instead.

func RegisterNotebookServer

func RegisterNotebookServer(s *grpc.Server, srv NotebookServer)

Types

type CreateEntryRequest

type CreateEntryRequest struct {
	Entry *Entry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateEntryRequest) Descriptor deprecated

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

Deprecated: Use CreateEntryRequest.ProtoReflect.Descriptor instead.

func (*CreateEntryRequest) GetEntry

func (x *CreateEntryRequest) GetEntry() *Entry

func (*CreateEntryRequest) ProtoMessage

func (*CreateEntryRequest) ProtoMessage()

func (*CreateEntryRequest) ProtoReflect

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

func (*CreateEntryRequest) Reset

func (x *CreateEntryRequest) Reset()

func (*CreateEntryRequest) String

func (x *CreateEntryRequest) String() string

type DeleteEntryRequest

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

func (*DeleteEntryRequest) Descriptor deprecated

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

Deprecated: Use DeleteEntryRequest.ProtoReflect.Descriptor instead.

func (*DeleteEntryRequest) GetId

func (x *DeleteEntryRequest) GetId() string

func (*DeleteEntryRequest) ProtoMessage

func (*DeleteEntryRequest) ProtoMessage()

func (*DeleteEntryRequest) ProtoReflect

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

func (*DeleteEntryRequest) Reset

func (x *DeleteEntryRequest) Reset()

func (*DeleteEntryRequest) String

func (x *DeleteEntryRequest) String() string

type DeleteEntryResponse

type DeleteEntryResponse struct {
	Entry *Entry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteEntryResponse) Descriptor deprecated

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

Deprecated: Use DeleteEntryResponse.ProtoReflect.Descriptor instead.

func (*DeleteEntryResponse) GetEntry

func (x *DeleteEntryResponse) GetEntry() *Entry

func (*DeleteEntryResponse) ProtoMessage

func (*DeleteEntryResponse) ProtoMessage()

func (*DeleteEntryResponse) ProtoReflect

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

func (*DeleteEntryResponse) Reset

func (x *DeleteEntryResponse) Reset()

func (*DeleteEntryResponse) String

func (x *DeleteEntryResponse) String() string

type Entry

type Entry struct {

	// Output only.
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// Output only.
	CreatorId string `protobuf:"bytes,3,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"`
	// Output only.
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Output only.
	UpdatedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// Output only.
	DeleteTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"`
	// contains filtered or unexported fields
}

func (*Entry) Descriptor deprecated

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

Deprecated: Use Entry.ProtoReflect.Descriptor instead.

func (*Entry) GetCreatedAt

func (x *Entry) GetCreatedAt() *timestamp.Timestamp

func (*Entry) GetCreatorId

func (x *Entry) GetCreatorId() string

func (*Entry) GetDeleteTime

func (x *Entry) GetDeleteTime() *timestamp.Timestamp

func (*Entry) GetId

func (x *Entry) GetId() string

func (*Entry) GetText

func (x *Entry) GetText() string

func (*Entry) GetUpdatedAt

func (x *Entry) GetUpdatedAt() *timestamp.Timestamp

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) ProtoReflect

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

func (*Entry) Reset

func (x *Entry) Reset()

func (*Entry) String

func (x *Entry) String() string

type EntryRevision

type EntryRevision struct {
	Entry *Entry     `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
	Actor *Principal `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"`
	// contains filtered or unexported fields
}

data.mesh.notebook.v2.EntryRevision

func (*EntryRevision) Descriptor deprecated

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

Deprecated: Use EntryRevision.ProtoReflect.Descriptor instead.

func (*EntryRevision) GetActor

func (x *EntryRevision) GetActor() *Principal

func (*EntryRevision) GetEntry

func (x *EntryRevision) GetEntry() *Entry

func (*EntryRevision) ProtoMessage

func (*EntryRevision) ProtoMessage()

func (*EntryRevision) ProtoReflect

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

func (*EntryRevision) Reset

func (x *EntryRevision) Reset()

func (*EntryRevision) String

func (x *EntryRevision) String() string

type GetEntryRequest

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

func (*GetEntryRequest) Descriptor deprecated

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

Deprecated: Use GetEntryRequest.ProtoReflect.Descriptor instead.

func (*GetEntryRequest) GetId

func (x *GetEntryRequest) GetId() string

func (*GetEntryRequest) ProtoMessage

func (*GetEntryRequest) ProtoMessage()

func (*GetEntryRequest) ProtoReflect

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

func (*GetEntryRequest) Reset

func (x *GetEntryRequest) Reset()

func (*GetEntryRequest) String

func (x *GetEntryRequest) String() string

type ListEntriesResponse

type ListEntriesResponse struct {
	Entries       []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	NextPageToken string   `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	TotalSize     int32    `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
	HasNextPage   bool     `protobuf:"varint,4,opt,name=has_next_page,json=hasNextPage,proto3" json:"has_next_page,omitempty"`
	// contains filtered or unexported fields
}

func (*ListEntriesResponse) Descriptor deprecated

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

Deprecated: Use ListEntriesResponse.ProtoReflect.Descriptor instead.

func (*ListEntriesResponse) GetEntries

func (x *ListEntriesResponse) GetEntries() []*Entry

func (*ListEntriesResponse) GetHasNextPage

func (x *ListEntriesResponse) GetHasNextPage() bool

func (*ListEntriesResponse) GetNextPageToken

func (x *ListEntriesResponse) GetNextPageToken() string

func (*ListEntriesResponse) GetTotalSize

func (x *ListEntriesResponse) GetTotalSize() int32

func (*ListEntriesResponse) ProtoMessage

func (*ListEntriesResponse) ProtoMessage()

func (*ListEntriesResponse) ProtoReflect

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

func (*ListEntriesResponse) Reset

func (x *ListEntriesResponse) Reset()

func (*ListEntriesResponse) String

func (x *ListEntriesResponse) String() string

type ListEntryRequest

type ListEntryRequest struct {
	PageSize  int32  `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListEntryRequest) Descriptor deprecated

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

Deprecated: Use ListEntryRequest.ProtoReflect.Descriptor instead.

func (*ListEntryRequest) GetPageSize

func (x *ListEntryRequest) GetPageSize() int32

func (*ListEntryRequest) GetPageToken

func (x *ListEntryRequest) GetPageToken() string

func (*ListEntryRequest) ProtoMessage

func (*ListEntryRequest) ProtoMessage()

func (*ListEntryRequest) ProtoReflect

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

func (*ListEntryRequest) Reset

func (x *ListEntryRequest) Reset()

func (*ListEntryRequest) String

func (x *ListEntryRequest) String() string

type NotebookClient

type NotebookClient interface {
	GetEntry(ctx context.Context, in *GetEntryRequest, opts ...grpc.CallOption) (*Entry, error)
	CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*Entry, error)
	UpdateEntry(ctx context.Context, in *UpdateEntryRequest, opts ...grpc.CallOption) (*Entry, error)
	ListEntries(ctx context.Context, in *ListEntryRequest, opts ...grpc.CallOption) (*ListEntriesResponse, error)
	DeleteEntry(ctx context.Context, in *DeleteEntryRequest, opts ...grpc.CallOption) (*DeleteEntryResponse, error)
	UndeleteEntry(ctx context.Context, in *UndeleteEntryRequest, opts ...grpc.CallOption) (*Entry, error)
}

NotebookClient is the client API for Notebook service.

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

func NewNotebookClient

func NewNotebookClient(cc grpc.ClientConnInterface) NotebookClient

type NotebookServer

NotebookServer is the server API for Notebook service.

type Principal

type Principal struct {
	Type Principal_Type `protobuf:"varint,1,opt,name=type,proto3,enum=notebook.v2.Principal_Type" json:"type,omitempty"`
	Id   string         `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Principal) Descriptor deprecated

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

Deprecated: Use Principal.ProtoReflect.Descriptor instead.

func (*Principal) GetId

func (x *Principal) GetId() string

func (*Principal) GetType

func (x *Principal) GetType() Principal_Type

func (*Principal) ProtoMessage

func (*Principal) ProtoMessage()

func (*Principal) ProtoReflect

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

func (*Principal) Reset

func (x *Principal) Reset()

func (*Principal) String

func (x *Principal) String() string

type Principal_Type

type Principal_Type int32
const (
	Principal_USER Principal_Type = 0
)

func (Principal_Type) Descriptor

func (Principal_Type) Enum

func (x Principal_Type) Enum() *Principal_Type

func (Principal_Type) EnumDescriptor deprecated

func (Principal_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Principal_Type.Descriptor instead.

func (Principal_Type) Number

func (Principal_Type) String

func (x Principal_Type) String() string

func (Principal_Type) Type

type UndeleteEntryRequest

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

func (*UndeleteEntryRequest) Descriptor deprecated

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

Deprecated: Use UndeleteEntryRequest.ProtoReflect.Descriptor instead.

func (*UndeleteEntryRequest) GetId

func (x *UndeleteEntryRequest) GetId() string

func (*UndeleteEntryRequest) ProtoMessage

func (*UndeleteEntryRequest) ProtoMessage()

func (*UndeleteEntryRequest) ProtoReflect

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

func (*UndeleteEntryRequest) Reset

func (x *UndeleteEntryRequest) Reset()

func (*UndeleteEntryRequest) String

func (x *UndeleteEntryRequest) String() string

type UnimplementedNotebookServer

type UnimplementedNotebookServer struct {
}

UnimplementedNotebookServer can be embedded to have forward compatible implementations.

func (*UnimplementedNotebookServer) CreateEntry

func (*UnimplementedNotebookServer) DeleteEntry

func (*UnimplementedNotebookServer) GetEntry

func (*UnimplementedNotebookServer) ListEntries

func (*UnimplementedNotebookServer) UndeleteEntry

func (*UnimplementedNotebookServer) UpdateEntry

type UpdateEntryRequest

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

func (*UpdateEntryRequest) Descriptor deprecated

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

Deprecated: Use UpdateEntryRequest.ProtoReflect.Descriptor instead.

func (*UpdateEntryRequest) GetEntry

func (x *UpdateEntryRequest) GetEntry() *Entry

func (*UpdateEntryRequest) GetId

func (x *UpdateEntryRequest) GetId() string

func (*UpdateEntryRequest) ProtoMessage

func (*UpdateEntryRequest) ProtoMessage()

func (*UpdateEntryRequest) ProtoReflect

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

func (*UpdateEntryRequest) Reset

func (x *UpdateEntryRequest) Reset()

func (*UpdateEntryRequest) String

func (x *UpdateEntryRequest) String() string

Jump to

Keyboard shortcuts

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