jdocspb

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

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

Go to latest
Published: Aug 24, 2021 License: MIT Imports: 16 Imported by: 10

Documentation

Overview

Package jdocspb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	WriteDocResp_Status_name = map[int32]string{
		0: "ACCEPTED",
		1: "REJECTED_BAD_DOC_VERSION",
		2: "REJECTED_BAD_FMT_VERSION",
	}
	WriteDocResp_Status_value = map[string]int32{
		"ACCEPTED":                 0,
		"REJECTED_BAD_DOC_VERSION": 1,
		"REJECTED_BAD_FMT_VERSION": 2,
	}
)

Enum value maps for WriteDocResp_Status.

View Source
var (
	ReadDocsResp_Status_name = map[int32]string{
		0: "UNCHANGED",
		1: "CHANGED",
		2: "NOT_FOUND",
	}
	ReadDocsResp_Status_value = map[string]int32{
		"UNCHANGED": 0,
		"CHANGED":   1,
		"NOT_FOUND": 2,
	}
)

Enum value maps for ReadDocsResp_Status.

View Source
var File_jdocs_proto protoreflect.FileDescriptor

Functions

func RegisterJdocsHandler

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

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

func RegisterJdocsHandlerClient

func RegisterJdocsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client JdocsClient) error

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

func RegisterJdocsHandlerFromEndpoint

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

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

func RegisterJdocsHandlerServer

func RegisterJdocsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server JdocsServer) error

RegisterJdocsHandlerServer registers the http handlers for service Jdocs to "mux". UnaryRPC :call JdocsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterJdocsServer

func RegisterJdocsServer(s *grpc.Server, srv JdocsServer)

Types

type DeleteDocReq

type DeleteDocReq struct {
	UserId  string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Thing   string `protobuf:"bytes,2,opt,name=thing,proto3" json:"thing,omitempty"`
	DocName string `protobuf:"bytes,3,opt,name=doc_name,json=docName,proto3" json:"doc_name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteDocReq) Descriptor deprecated

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

Deprecated: Use DeleteDocReq.ProtoReflect.Descriptor instead.

func (*DeleteDocReq) GetDocName

func (x *DeleteDocReq) GetDocName() string

func (*DeleteDocReq) GetThing

func (x *DeleteDocReq) GetThing() string

func (*DeleteDocReq) GetUserId

func (x *DeleteDocReq) GetUserId() string

func (*DeleteDocReq) ProtoMessage

func (*DeleteDocReq) ProtoMessage()

func (*DeleteDocReq) ProtoReflect

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

func (*DeleteDocReq) Reset

func (x *DeleteDocReq) Reset()

func (*DeleteDocReq) String

func (x *DeleteDocReq) String() string

type DeleteDocResp

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

func (*DeleteDocResp) Descriptor deprecated

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

Deprecated: Use DeleteDocResp.ProtoReflect.Descriptor instead.

func (*DeleteDocResp) ProtoMessage

func (*DeleteDocResp) ProtoMessage()

func (*DeleteDocResp) ProtoReflect

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

func (*DeleteDocResp) Reset

func (x *DeleteDocResp) Reset()

func (*DeleteDocResp) String

func (x *DeleteDocResp) String() string

type EchoReq

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

func (*EchoReq) Descriptor deprecated

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

Deprecated: Use EchoReq.ProtoReflect.Descriptor instead.

func (*EchoReq) GetData

func (x *EchoReq) GetData() string

func (*EchoReq) ProtoMessage

func (*EchoReq) ProtoMessage()

func (*EchoReq) ProtoReflect

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

func (*EchoReq) Reset

func (x *EchoReq) Reset()

func (*EchoReq) String

func (x *EchoReq) String() string

type EchoResp

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

func (*EchoResp) Descriptor deprecated

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

Deprecated: Use EchoResp.ProtoReflect.Descriptor instead.

func (*EchoResp) GetData

func (x *EchoResp) GetData() string

func (*EchoResp) ProtoMessage

func (*EchoResp) ProtoMessage()

func (*EchoResp) ProtoReflect

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

func (*EchoResp) Reset

func (x *EchoResp) Reset()

func (*EchoResp) String

func (x *EchoResp) String() string

type Jdoc

type Jdoc struct {
	DocVersion     uint64 `protobuf:"varint,1,opt,name=doc_version,json=docVersion,proto3" json:"doc_version,omitempty"`            // first version = 1; 0 => invalid or doesn't exist
	FmtVersion     uint64 `protobuf:"varint,2,opt,name=fmt_version,json=fmtVersion,proto3" json:"fmt_version,omitempty"`            // first version = 1; 0 => invalid
	ClientMetadata string `protobuf:"bytes,3,opt,name=client_metadata,json=clientMetadata,proto3" json:"client_metadata,omitempty"` // arbitrary client-defined string, eg a data fingerprint (typ "", 32 chars max)
	JsonDoc        string `protobuf:"bytes,4,opt,name=json_doc,json=jsonDoc,proto3" json:"json_doc,omitempty"`                      // must be a valid JSON document
	// contains filtered or unexported fields
}

func (*Jdoc) Descriptor deprecated

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

Deprecated: Use Jdoc.ProtoReflect.Descriptor instead.

func (*Jdoc) GetClientMetadata

func (x *Jdoc) GetClientMetadata() string

func (*Jdoc) GetDocVersion

func (x *Jdoc) GetDocVersion() uint64

func (*Jdoc) GetFmtVersion

func (x *Jdoc) GetFmtVersion() uint64

func (*Jdoc) GetJsonDoc

func (x *Jdoc) GetJsonDoc() string

func (*Jdoc) ProtoMessage

func (*Jdoc) ProtoMessage()

func (*Jdoc) ProtoReflect

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

func (*Jdoc) Reset

func (x *Jdoc) Reset()

func (*Jdoc) String

func (x *Jdoc) String() string

type JdocsClient

type JdocsClient interface {
	// Write = Create or Update one document
	WriteDoc(ctx context.Context, in *WriteDocReq, opts ...grpc.CallOption) (*WriteDocResp, error)
	// Read latest version of one or more documents (single user_id/thing)
	ReadDocs(ctx context.Context, in *ReadDocsReq, opts ...grpc.CallOption) (*ReadDocsResp, error)
	// Delete one document. If the document does not exist, the request
	// quietly succeeds (no error).
	DeleteDoc(ctx context.Context, in *DeleteDocReq, opts ...grpc.CallOption) (*DeleteDocResp, error)
	// Purge all documents associated with an account. Operation is idempotent,
	// ie it is not an error to purge the same account multiple times.
	PurgeAccountDocs(ctx context.Context, in *PurgeAccountDocsReq, opts ...grpc.CallOption) (*PurgeAccountDocsResp, error)
	// Return all documents associated with a user account, for viewing
	// purposes. Purged documents are not returned.
	ViewAccountDocs(ctx context.Context, in *ViewAccountDocsReq, opts ...grpc.CallOption) (*ViewDocsResp, error)
	// Return all documents associated with a user account that contain
	// personal data, for viewing purposes. Purged documents are not returned.
	ViewAccountDocsWithPII(ctx context.Context, in *ViewAccountDocsReq, opts ...grpc.CallOption) (*ViewDocsResp, error)
}

JdocsClient is the client API for Jdocs service.

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

func NewJdocsClient

func NewJdocsClient(cc grpc.ClientConnInterface) JdocsClient

type JdocsServer

type JdocsServer interface {
	// Write = Create or Update one document
	WriteDoc(context.Context, *WriteDocReq) (*WriteDocResp, error)
	// Read latest version of one or more documents (single user_id/thing)
	ReadDocs(context.Context, *ReadDocsReq) (*ReadDocsResp, error)
	// Delete one document. If the document does not exist, the request
	// quietly succeeds (no error).
	DeleteDoc(context.Context, *DeleteDocReq) (*DeleteDocResp, error)
	// Purge all documents associated with an account. Operation is idempotent,
	// ie it is not an error to purge the same account multiple times.
	PurgeAccountDocs(context.Context, *PurgeAccountDocsReq) (*PurgeAccountDocsResp, error)
	// Return all documents associated with a user account, for viewing
	// purposes. Purged documents are not returned.
	ViewAccountDocs(context.Context, *ViewAccountDocsReq) (*ViewDocsResp, error)
	// Return all documents associated with a user account that contain
	// personal data, for viewing purposes. Purged documents are not returned.
	ViewAccountDocsWithPII(context.Context, *ViewAccountDocsReq) (*ViewDocsResp, error)
}

JdocsServer is the server API for Jdocs service.

type PurgeAccountDocsReq

type PurgeAccountDocsReq struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` // concise reason, eg "purged-via-api"
	Notes  string `protobuf:"bytes,3,opt,name=notes,proto3" json:"notes,omitempty"`   // free-form text notes, eg "CC requested this via email"
	// contains filtered or unexported fields
}

func (*PurgeAccountDocsReq) Descriptor deprecated

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

Deprecated: Use PurgeAccountDocsReq.ProtoReflect.Descriptor instead.

func (*PurgeAccountDocsReq) GetNotes

func (x *PurgeAccountDocsReq) GetNotes() string

func (*PurgeAccountDocsReq) GetReason

func (x *PurgeAccountDocsReq) GetReason() string

func (*PurgeAccountDocsReq) GetUserId

func (x *PurgeAccountDocsReq) GetUserId() string

func (*PurgeAccountDocsReq) ProtoMessage

func (*PurgeAccountDocsReq) ProtoMessage()

func (*PurgeAccountDocsReq) ProtoReflect

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

func (*PurgeAccountDocsReq) Reset

func (x *PurgeAccountDocsReq) Reset()

func (*PurgeAccountDocsReq) String

func (x *PurgeAccountDocsReq) String() string

type PurgeAccountDocsResp

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

func (*PurgeAccountDocsResp) Descriptor deprecated

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

Deprecated: Use PurgeAccountDocsResp.ProtoReflect.Descriptor instead.

func (*PurgeAccountDocsResp) ProtoMessage

func (*PurgeAccountDocsResp) ProtoMessage()

func (*PurgeAccountDocsResp) ProtoReflect

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

func (*PurgeAccountDocsResp) Reset

func (x *PurgeAccountDocsResp) Reset()

func (*PurgeAccountDocsResp) String

func (x *PurgeAccountDocsResp) String() string

type ReadDocsReq

type ReadDocsReq struct {
	UserId string              `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Thing  string              `protobuf:"bytes,2,opt,name=thing,proto3" json:"thing,omitempty"`
	Items  []*ReadDocsReq_Item `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadDocsReq) Descriptor deprecated

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

Deprecated: Use ReadDocsReq.ProtoReflect.Descriptor instead.

func (*ReadDocsReq) GetItems

func (x *ReadDocsReq) GetItems() []*ReadDocsReq_Item

func (*ReadDocsReq) GetThing

func (x *ReadDocsReq) GetThing() string

func (*ReadDocsReq) GetUserId

func (x *ReadDocsReq) GetUserId() string

func (*ReadDocsReq) ProtoMessage

func (*ReadDocsReq) ProtoMessage()

func (*ReadDocsReq) ProtoReflect

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

func (*ReadDocsReq) Reset

func (x *ReadDocsReq) Reset()

func (*ReadDocsReq) String

func (x *ReadDocsReq) String() string

type ReadDocsReq_Item

type ReadDocsReq_Item struct {
	DocName      string `protobuf:"bytes,1,opt,name=doc_name,json=docName,proto3" json:"doc_name,omitempty"`
	MyDocVersion uint64 `protobuf:"varint,2,opt,name=my_doc_version,json=myDocVersion,proto3" json:"my_doc_version,omitempty"` // 0 => always return latest version
	// contains filtered or unexported fields
}

func (*ReadDocsReq_Item) Descriptor deprecated

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

Deprecated: Use ReadDocsReq_Item.ProtoReflect.Descriptor instead.

func (*ReadDocsReq_Item) GetDocName

func (x *ReadDocsReq_Item) GetDocName() string

func (*ReadDocsReq_Item) GetMyDocVersion

func (x *ReadDocsReq_Item) GetMyDocVersion() uint64

func (*ReadDocsReq_Item) ProtoMessage

func (*ReadDocsReq_Item) ProtoMessage()

func (*ReadDocsReq_Item) ProtoReflect

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

func (*ReadDocsReq_Item) Reset

func (x *ReadDocsReq_Item) Reset()

func (*ReadDocsReq_Item) String

func (x *ReadDocsReq_Item) String() string

type ReadDocsResp

type ReadDocsResp struct {
	Items []*ReadDocsResp_Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadDocsResp) Descriptor deprecated

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

Deprecated: Use ReadDocsResp.ProtoReflect.Descriptor instead.

func (*ReadDocsResp) GetItems

func (x *ReadDocsResp) GetItems() []*ReadDocsResp_Item

func (*ReadDocsResp) ProtoMessage

func (*ReadDocsResp) ProtoMessage()

func (*ReadDocsResp) ProtoReflect

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

func (*ReadDocsResp) Reset

func (x *ReadDocsResp) Reset()

func (*ReadDocsResp) String

func (x *ReadDocsResp) String() string

type ReadDocsResp_Item

type ReadDocsResp_Item struct {
	Status ReadDocsResp_Status `protobuf:"varint,1,opt,name=status,proto3,enum=jdocspb.ReadDocsResp_Status" json:"status,omitempty"`
	Doc    *Jdoc               `protobuf:"bytes,2,opt,name=doc,proto3" json:"doc,omitempty"` // json_doc=="" if (svc.doc_version==my_doc_version)
	// contains filtered or unexported fields
}

func (*ReadDocsResp_Item) Descriptor deprecated

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

Deprecated: Use ReadDocsResp_Item.ProtoReflect.Descriptor instead.

func (*ReadDocsResp_Item) GetDoc

func (x *ReadDocsResp_Item) GetDoc() *Jdoc

func (*ReadDocsResp_Item) GetStatus

func (x *ReadDocsResp_Item) GetStatus() ReadDocsResp_Status

func (*ReadDocsResp_Item) ProtoMessage

func (*ReadDocsResp_Item) ProtoMessage()

func (*ReadDocsResp_Item) ProtoReflect

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

func (*ReadDocsResp_Item) Reset

func (x *ReadDocsResp_Item) Reset()

func (*ReadDocsResp_Item) String

func (x *ReadDocsResp_Item) String() string

type ReadDocsResp_Status

type ReadDocsResp_Status int32
const (
	ReadDocsResp_UNCHANGED ReadDocsResp_Status = 0 // (svc.doc_version == my_doc_version)
	ReadDocsResp_CHANGED   ReadDocsResp_Status = 1 // (svc.doc_version  > my_doc_version) || (svc.doc_version < my_doc_version)
	ReadDocsResp_NOT_FOUND ReadDocsResp_Status = 2 // soft error
)

func (ReadDocsResp_Status) Descriptor

func (ReadDocsResp_Status) Enum

func (ReadDocsResp_Status) EnumDescriptor deprecated

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

Deprecated: Use ReadDocsResp_Status.Descriptor instead.

func (ReadDocsResp_Status) Number

func (ReadDocsResp_Status) String

func (x ReadDocsResp_Status) String() string

func (ReadDocsResp_Status) Type

type UnimplementedJdocsServer

type UnimplementedJdocsServer struct {
}

UnimplementedJdocsServer can be embedded to have forward compatible implementations.

func (*UnimplementedJdocsServer) DeleteDoc

func (*UnimplementedJdocsServer) PurgeAccountDocs

func (*UnimplementedJdocsServer) ReadDocs

func (*UnimplementedJdocsServer) ViewAccountDocs

func (*UnimplementedJdocsServer) ViewAccountDocsWithPII

func (*UnimplementedJdocsServer) WriteDoc

type ViewAccountDocsReq

type ViewAccountDocsReq struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ViewAccountDocsReq) Descriptor deprecated

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

Deprecated: Use ViewAccountDocsReq.ProtoReflect.Descriptor instead.

func (*ViewAccountDocsReq) GetUserId

func (x *ViewAccountDocsReq) GetUserId() string

func (*ViewAccountDocsReq) ProtoMessage

func (*ViewAccountDocsReq) ProtoMessage()

func (*ViewAccountDocsReq) ProtoReflect

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

func (*ViewAccountDocsReq) Reset

func (x *ViewAccountDocsReq) Reset()

func (*ViewAccountDocsReq) String

func (x *ViewAccountDocsReq) String() string

type ViewDoc

type ViewDoc struct {
	UserId  string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Thing   string `protobuf:"bytes,2,opt,name=thing,proto3" json:"thing,omitempty"`
	DocName string `protobuf:"bytes,3,opt,name=doc_name,json=docName,proto3" json:"doc_name,omitempty"`
	JsonDoc string `protobuf:"bytes,4,opt,name=json_doc,json=jsonDoc,proto3" json:"json_doc,omitempty"`
	// contains filtered or unexported fields
}

ViewDoc is a more end-user-friendly version of a JDOCS document, for viewing purposes by support or the end user. It contains the JSON document itself along with account/thing identifiers, but does not include doc_version and other metadata needed by a typical JDOCS client.

func (*ViewDoc) Descriptor deprecated

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

Deprecated: Use ViewDoc.ProtoReflect.Descriptor instead.

func (*ViewDoc) GetDocName

func (x *ViewDoc) GetDocName() string

func (*ViewDoc) GetJsonDoc

func (x *ViewDoc) GetJsonDoc() string

func (*ViewDoc) GetThing

func (x *ViewDoc) GetThing() string

func (*ViewDoc) GetUserId

func (x *ViewDoc) GetUserId() string

func (*ViewDoc) ProtoMessage

func (*ViewDoc) ProtoMessage()

func (*ViewDoc) ProtoReflect

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

func (*ViewDoc) Reset

func (x *ViewDoc) Reset()

func (*ViewDoc) String

func (x *ViewDoc) String() string

type ViewDocsResp

type ViewDocsResp struct {
	Docs []*ViewDoc `protobuf:"bytes,1,rep,name=docs,proto3" json:"docs,omitempty"`
	// contains filtered or unexported fields
}

func (*ViewDocsResp) Descriptor deprecated

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

Deprecated: Use ViewDocsResp.ProtoReflect.Descriptor instead.

func (*ViewDocsResp) GetDocs

func (x *ViewDocsResp) GetDocs() []*ViewDoc

func (*ViewDocsResp) ProtoMessage

func (*ViewDocsResp) ProtoMessage()

func (*ViewDocsResp) ProtoReflect

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

func (*ViewDocsResp) Reset

func (x *ViewDocsResp) Reset()

func (*ViewDocsResp) String

func (x *ViewDocsResp) String() string

type WriteDocReq

type WriteDocReq struct {
	UserId  string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 64 chars max
	Thing   string `protobuf:"bytes,2,opt,name=thing,proto3" json:"thing,omitempty"`                 // 64 chars max
	DocName string `protobuf:"bytes,3,opt,name=doc_name,json=docName,proto3" json:"doc_name,omitempty"`
	Doc     *Jdoc  `protobuf:"bytes,4,opt,name=doc,proto3" json:"doc,omitempty"` // write rejected if (doc.doc_version != svc.doc_version)
	// contains filtered or unexported fields
}

func (*WriteDocReq) Descriptor deprecated

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

Deprecated: Use WriteDocReq.ProtoReflect.Descriptor instead.

func (*WriteDocReq) GetDoc

func (x *WriteDocReq) GetDoc() *Jdoc

func (*WriteDocReq) GetDocName

func (x *WriteDocReq) GetDocName() string

func (*WriteDocReq) GetThing

func (x *WriteDocReq) GetThing() string

func (*WriteDocReq) GetUserId

func (x *WriteDocReq) GetUserId() string

func (*WriteDocReq) ProtoMessage

func (*WriteDocReq) ProtoMessage()

func (*WriteDocReq) ProtoReflect

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

func (*WriteDocReq) Reset

func (x *WriteDocReq) Reset()

func (*WriteDocReq) String

func (x *WriteDocReq) String() string

type WriteDocResp

type WriteDocResp struct {
	Status           WriteDocResp_Status `protobuf:"varint,1,opt,name=status,proto3,enum=jdocspb.WriteDocResp_Status" json:"status,omitempty"`
	LatestDocVersion uint64              `protobuf:"varint,2,opt,name=latest_doc_version,json=latestDocVersion,proto3" json:"latest_doc_version,omitempty"` // latest version on service
	// contains filtered or unexported fields
}

func (*WriteDocResp) Descriptor deprecated

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

Deprecated: Use WriteDocResp.ProtoReflect.Descriptor instead.

func (*WriteDocResp) GetLatestDocVersion

func (x *WriteDocResp) GetLatestDocVersion() uint64

func (*WriteDocResp) GetStatus

func (x *WriteDocResp) GetStatus() WriteDocResp_Status

func (*WriteDocResp) ProtoMessage

func (*WriteDocResp) ProtoMessage()

func (*WriteDocResp) ProtoReflect

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

func (*WriteDocResp) Reset

func (x *WriteDocResp) Reset()

func (*WriteDocResp) String

func (x *WriteDocResp) String() string

type WriteDocResp_Status

type WriteDocResp_Status int32
const (
	WriteDocResp_ACCEPTED                 WriteDocResp_Status = 0
	WriteDocResp_REJECTED_BAD_DOC_VERSION WriteDocResp_Status = 1 // soft error
	WriteDocResp_REJECTED_BAD_FMT_VERSION WriteDocResp_Status = 2 // soft error
)

func (WriteDocResp_Status) Descriptor

func (WriteDocResp_Status) Enum

func (WriteDocResp_Status) EnumDescriptor deprecated

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

Deprecated: Use WriteDocResp_Status.Descriptor instead.

func (WriteDocResp_Status) Number

func (WriteDocResp_Status) String

func (x WriteDocResp_Status) String() string

func (WriteDocResp_Status) Type

Jump to

Keyboard shortcuts

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