Documentation ¶
Overview ¶
Code generated by doc-generator. DO NOT EDIT.
Index ¶
- Variables
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (d *Block) FromDocBlock(doc *doc.Block) error
- func (x *Block) GetContent() []*Block
- func (x *Block) GetContentType() string
- func (x *Block) GetData() map[string]string
- func (x *Block) GetId() string
- func (x *Block) GetLinks() []*Block
- func (x *Block) GetMeta() []*Block
- func (x *Block) GetName() string
- func (x *Block) GetRel() string
- func (x *Block) GetRole() string
- func (x *Block) GetTitle() string
- func (x *Block) GetType() string
- func (x *Block) GetUri() string
- func (x *Block) GetUrl() string
- func (x *Block) GetUuid() string
- func (x *Block) GetValue() string
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- func (d *Block) ToDocBlock(doc *doc.Block) error
- type Document
- func (*Document) Descriptor() ([]byte, []int)deprecated
- func (d *Document) FromDocDocument(doc *doc.Document) error
- func (x *Document) GetContent() []*Block
- func (x *Document) GetCreated() *timestamppb.Timestamp
- func (x *Document) GetLanguage() string
- func (x *Document) GetLinks() []*Block
- func (x *Document) GetMeta() []*Block
- func (x *Document) GetModified() *timestamppb.Timestamp
- func (x *Document) GetPath() string
- func (x *Document) GetProducts() []stringdeprecated
- func (x *Document) GetProperties() []*Property
- func (x *Document) GetProvider() string
- func (x *Document) GetPublished() *timestamppb.Timestamp
- func (x *Document) GetSource() string
- func (x *Document) GetStatus() string
- func (x *Document) GetTitle() string
- func (x *Document) GetType() string
- func (x *Document) GetUnpublished() *timestamppb.Timestamp
- func (x *Document) GetUri() string
- func (x *Document) GetUrl() string
- func (x *Document) GetUuid() string
- func (*Document) ProtoMessage()
- func (x *Document) ProtoReflect() protoreflect.Message
- func (x *Document) Reset()
- func (x *Document) String() string
- func (d *Document) ToDocDocument(doc *doc.Document) error
- type Property
- func (*Property) Descriptor() ([]byte, []int)deprecated
- func (d *Property) FromDocProperty(doc *doc.Property) error
- func (x *Property) GetName() string
- func (x *Property) GetParameters() map[string]string
- func (x *Property) GetValue() string
- func (*Property) ProtoMessage()
- func (x *Property) ProtoReflect() protoreflect.Message
- func (x *Property) Reset()
- func (x *Property) String() string
- func (d *Property) ToDocProperty(doc *doc.Property) error
Constants ¶
This section is empty.
Variables ¶
View Source
var File_rpc_document_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { // ID is the block ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // UUID is used to reference another Document in a block. Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // URI is used to reference another entity in a document. Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` // URL is a browseable URL for the the block. Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` // Type is the type of the block Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` // Title is the title/headline of the block, typically used in the // presentation of the block. Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` // Data contains block data Data map[string]string `` /* 149-byte string literal not displayed */ // Relationship describes the relationship to the document/parent // entity Rel string `protobuf:"bytes,8,opt,name=rel,proto3" json:"rel,omitempty"` // Name is a name for the block. An alternative to "rel" when // relationship is a term that doesn't fit. Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"` // Value is a value for the block. Useful when we want to store a // primitive value. Value string `protobuf:"bytes,10,opt,name=value,proto3" json:"value,omitempty"` // ContentType is used to describe the content type of the // block/linked entity if it differs from the type of the block. ContentType string `protobuf:"bytes,11,opt,name=contentType,proto3" json:"contentType,omitempty"` // Links are used to link to other resources and documents. Links []*Block `protobuf:"bytes,13,rep,name=links,proto3" json:"links,omitempty"` // Content is used to embed content blocks. Content []*Block `protobuf:"bytes,14,rep,name=content,proto3" json:"content,omitempty"` // Meta is used to embed metadata Meta []*Block `protobuf:"bytes,15,rep,name=meta,proto3" json:"meta,omitempty"` // Role is used for Role string `protobuf:"bytes,16,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
Block is the building block for data embedded in documents. It is used for both content, links and metadata. Blocks have can be nested, but that's nothing to strive for, keep it simple.
func (*Block) Descriptor
deprecated
func (*Block) GetContent ¶
func (*Block) GetContentType ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type Document ¶
type Document struct { // UUID is a unique ID for the document, this can be a random v4 // UUID, or a URI-derived v5 UUID. Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // Type is the content type of the document. Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // URI identifies the document (in a more human-readable way than // the UUID) Uri string `protobuf:"bytes,4,opt,name=uri,proto3" json:"uri,omitempty"` // URL is the browseable location of the document (if any) Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` // Title is the title of the document, often used as the headline // when the document is displayed. Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` // Path is the path on which the document can be exposed when // consumed through a website. Path string `protobuf:"bytes,8,opt,name=path,proto3" json:"path,omitempty"` // Products is a list of products that the document should be used // in. // // Deprecated: Do not use. Products []string `protobuf:"bytes,9,rep,name=products,proto3" json:"products,omitempty"` // Created is the initial creation time of the document. Created *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created,proto3" json:"created,omitempty"` // Modified is the modified time as is should be presented to end // users, the actual modified timestamp is recorded in the document // commit. There is probably no reason not to update this timestamp // when doing manual edits. Automated tools and systems should // probably leave it alone tho. Modified *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=modified,proto3" json:"modified,omitempty"` // Published is the published timestamp as it should be presented to // end users. The actual published timestamp is recorded in the // document commits in the "usable" branch. This shouldn't be // touched after the initial publishing of the document. Published *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=published,proto3" json:"published,omitempty"` // Content is the content of the documen, this is essentially what // gets rendered on the page when you view a document. Content []*Block `protobuf:"bytes,13,rep,name=content,proto3" json:"content,omitempty"` // Meta is the metadata for a document, this could be stuff like // open graph tags and content profile information. Meta []*Block `protobuf:"bytes,14,rep,name=meta,proto3" json:"meta,omitempty"` // Links are links to other resources and entities. This could be // links to categories and subject for the document, or authors. Links []*Block `protobuf:"bytes,15,rep,name=links,proto3" json:"links,omitempty"` // Properties are header-like properties for a document. This is // mainly used as a bucket for document-level stuff that needs to be // preserved when converting to and from other document formats. Properties []*Property `protobuf:"bytes,16,rep,name=properties,proto3" json:"properties,omitempty"` // Source is the name of the source of the document, usually the // name of the application that generated it (or allowed a user to // generate it). Source string `protobuf:"bytes,17,opt,name=source,proto3" json:"source,omitempty"` // Language is the language used in the document as an IETF language // tag. F.ex. "en", "en-UK", "es", or "sv-SE". Language string `protobuf:"bytes,18,opt,name=language,proto3" json:"language,omitempty"` // A free form field detailing the status for the document, for example: // "draft" or "withheld". Status string `protobuf:"bytes,19,opt,name=status,proto3" json:"status,omitempty"` Unpublished *timestamppb.Timestamp `protobuf:"bytes,20,opt,name=unpublished,proto3" json:"unpublished,omitempty"` Provider string `protobuf:"bytes,21,opt,name=provider,proto3" json:"provider,omitempty"` // string infoSource = 22; // contains filtered or unexported fields }
Document is the content, doh!
func (*Document) Descriptor
deprecated
func (*Document) GetContent ¶
func (*Document) GetCreated ¶
func (x *Document) GetCreated() *timestamppb.Timestamp
func (*Document) GetLanguage ¶
func (*Document) GetModified ¶
func (x *Document) GetModified() *timestamppb.Timestamp
func (*Document) GetProducts
deprecated
func (*Document) GetProperties ¶
func (*Document) GetProvider ¶
func (*Document) GetPublished ¶
func (x *Document) GetPublished() *timestamppb.Timestamp
func (*Document) GetUnpublished ¶
func (x *Document) GetUnpublished() *timestamppb.Timestamp
func (*Document) ProtoMessage ¶
func (*Document) ProtoMessage()
func (*Document) ProtoReflect ¶
func (x *Document) ProtoReflect() protoreflect.Message
type Property ¶
type Property struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Parameters map[string]string `` /* 161-byte string literal not displayed */ // contains filtered or unexported fields }
Property is a key-value pair
func (*Property) Descriptor
deprecated
func (*Property) GetParameters ¶
func (*Property) ProtoMessage ¶
func (*Property) ProtoMessage()
func (*Property) ProtoReflect ¶
func (x *Property) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.