Documentation ¶
Index ¶
- Variables
- func RegisterArticleServiceServer(s grpc.ServiceRegistrar, srv ArticleServiceServer)
- type Article
- func (*Article) Descriptor() ([]byte, []int)deprecated
- func (x *Article) GetBody() *Body
- func (x *Article) GetElements() []*Element
- func (x *Article) GetFields() map[string]string
- func (x *Article) GetId() int64
- func (x *Article) GetKeywords() []string
- func (x *Article) GetMetadata() *Metadata
- func (x *Article) GetOnwards() []int64
- func (x *Article) GetSectionTree() *Reference
- func (x *Article) GetSubType() Article_ContentSubType
- func (x *Article) GetType() Article_ContentType
- func (*Article) ProtoMessage()
- func (x *Article) ProtoReflect() protoreflect.Message
- func (x *Article) Reset()
- func (x *Article) String() string
- type ArticleServiceClient
- type ArticleServiceServer
- type Article_ContentSubType
- func (Article_ContentSubType) Descriptor() protoreflect.EnumDescriptor
- func (x Article_ContentSubType) Enum() *Article_ContentSubType
- func (Article_ContentSubType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Article_ContentSubType) Number() protoreflect.EnumNumber
- func (x Article_ContentSubType) String() string
- func (Article_ContentSubType) Type() protoreflect.EnumType
- type Article_ContentType
- func (Article_ContentType) Descriptor() protoreflect.EnumDescriptor
- func (x Article_ContentType) Enum() *Article_ContentType
- func (Article_ContentType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Article_ContentType) Number() protoreflect.EnumNumber
- func (x Article_ContentType) String() string
- func (Article_ContentType) Type() protoreflect.EnumType
- type Asset
- func (*Asset) Descriptor() ([]byte, []int)deprecated
- func (x *Asset) GetFields() map[string]string
- func (x *Asset) GetMetadata() *Metadata
- func (x *Asset) GetType() Asset_AssetType
- func (*Asset) ProtoMessage()
- func (x *Asset) ProtoReflect() protoreflect.Message
- func (x *Asset) Reset()
- func (x *Asset) String() string
- type Asset_AssetType
- func (Asset_AssetType) Descriptor() protoreflect.EnumDescriptor
- func (x Asset_AssetType) Enum() *Asset_AssetType
- func (Asset_AssetType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Asset_AssetType) Number() protoreflect.EnumNumber
- func (x Asset_AssetType) String() string
- func (Asset_AssetType) Type() protoreflect.EnumType
- type Body
- type BodyNode
- func (*BodyNode) Descriptor() ([]byte, []int)deprecated
- func (x *BodyNode) GetChildren() []*BodyNode
- func (x *BodyNode) GetElements() []*Element
- func (x *BodyNode) GetFields() map[string]string
- func (x *BodyNode) GetText() string
- func (x *BodyNode) GetType() string
- func (*BodyNode) ProtoMessage()
- func (x *BodyNode) ProtoReflect() protoreflect.Message
- func (x *BodyNode) Reset()
- func (x *BodyNode) String() string
- type Element
- func (*Element) Descriptor() ([]byte, []int)deprecated
- func (x *Element) GetAssets() []*Asset
- func (x *Element) GetChildren() []*Element
- func (x *Element) GetRelations() []Element_ElementRelation
- func (x *Element) GetType() Element_ElementType
- func (*Element) ProtoMessage()
- func (x *Element) ProtoReflect() protoreflect.Message
- func (x *Element) Reset()
- func (x *Element) String() string
- type Element_ElementRelation
- func (Element_ElementRelation) Descriptor() protoreflect.EnumDescriptor
- func (x Element_ElementRelation) Enum() *Element_ElementRelation
- func (Element_ElementRelation) EnumDescriptor() ([]byte, []int)deprecated
- func (x Element_ElementRelation) Number() protoreflect.EnumNumber
- func (x Element_ElementRelation) String() string
- func (Element_ElementRelation) Type() protoreflect.EnumType
- type Element_ElementType
- func (Element_ElementType) Descriptor() protoreflect.EnumDescriptor
- func (x Element_ElementType) Enum() *Element_ElementType
- func (Element_ElementType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Element_ElementType) Number() protoreflect.EnumNumber
- func (x Element_ElementType) String() string
- func (Element_ElementType) Type() protoreflect.EnumType
- type GetArticleRequest
- type ListArticlesRequest
- func (*ListArticlesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListArticlesRequest) GetPageSize() int32
- func (x *ListArticlesRequest) GetPageToken() string
- func (x *ListArticlesRequest) GetSectionPath() string
- func (*ListArticlesRequest) ProtoMessage()
- func (x *ListArticlesRequest) ProtoReflect() protoreflect.Message
- func (x *ListArticlesRequest) Reset()
- func (x *ListArticlesRequest) String() string
- type ListArticlesResponse
- func (*ListArticlesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListArticlesResponse) GetArticles() []*Article
- func (x *ListArticlesResponse) GetNextPageToken() string
- func (*ListArticlesResponse) ProtoMessage()
- func (x *ListArticlesResponse) ProtoReflect() protoreflect.Message
- func (x *ListArticlesResponse) Reset()
- func (x *ListArticlesResponse) String() string
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetEndTime() *timestamppb.Timestamp
- func (x *Metadata) GetPublishTime() *timestamppb.Timestamp
- func (x *Metadata) GetStartTime() *timestamppb.Timestamp
- func (x *Metadata) GetState() Metadata_State
- func (x *Metadata) GetTransformationErrors() int64
- func (x *Metadata) GetTransformationTime() *timestamppb.Timestamp
- func (x *Metadata) GetUpdateTime() *timestamppb.Timestamp
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- type Metadata_State
- func (Metadata_State) Descriptor() protoreflect.EnumDescriptor
- func (x Metadata_State) Enum() *Metadata_State
- func (Metadata_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x Metadata_State) Number() protoreflect.EnumNumber
- func (x Metadata_State) String() string
- func (Metadata_State) Type() protoreflect.EnumType
- type Reference
- func (*Reference) Descriptor() ([]byte, []int)deprecated
- func (x *Reference) GetChildren() []*Reference
- func (x *Reference) GetFields() map[string]string
- func (x *Reference) GetHref() string
- func (x *Reference) GetLabel() string
- func (x *Reference) GetType() string
- func (*Reference) ProtoMessage()
- func (x *Reference) ProtoReflect() protoreflect.Message
- func (x *Reference) Reset()
- func (x *Reference) String() string
- type UnimplementedArticleServiceServer
- type UnsafeArticleServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Article_ContentType_name = map[int32]string{ 0: "CONTENT_TYPE_UNSPECIFIED", 1: "ARTICLE", 2: "IMAGE", 3: "VIDEO", 4: "GALLERY", 5: "OEMBED", 6: "AUTHOR", 7: "AGENCY", } Article_ContentType_value = map[string]int32{ "CONTENT_TYPE_UNSPECIFIED": 0, "ARTICLE": 1, "IMAGE": 2, "VIDEO": 3, "GALLERY": 4, "OEMBED": 5, "AUTHOR": 6, "AGENCY": 7, } )
Enum value maps for Article_ContentType.
var ( Article_ContentSubType_name = map[int32]string{ 0: "CONTENT_SUB_TYPE_UNSPECIFIED", 1: "NEWS", 2: "COLUMN", 3: "REPORT", 4: "COMMENTARY", 5: "INTERVIEW", 6: "CONTROVERSY", 7: "STORY", 8: "RECENSION", 9: "TAGESANBRUCH", 10: "ANALYSIS", 11: "SATIRE", 12: "AGENCY_IMPORT", } Article_ContentSubType_value = map[string]int32{ "CONTENT_SUB_TYPE_UNSPECIFIED": 0, "NEWS": 1, "COLUMN": 2, "REPORT": 3, "COMMENTARY": 4, "INTERVIEW": 5, "CONTROVERSY": 6, "STORY": 7, "RECENSION": 8, "TAGESANBRUCH": 9, "ANALYSIS": 10, "SATIRE": 11, "AGENCY_IMPORT": 12, } )
Enum value maps for Article_ContentSubType.
var ( Metadata_State_name = map[int32]string{ 0: "STATE_UNSPECIFIED", 1: "PUBLISHED", 2: "DELETED", 3: "DRAFT", } Metadata_State_value = map[string]int32{ "STATE_UNSPECIFIED": 0, "PUBLISHED": 1, "DELETED": 2, "DRAFT": 3, } )
Enum value maps for Metadata_State.
var ( Element_ElementType_name = map[int32]string{ 0: "ELEMENT_TYPE_UNSPECIFIED", 1: "ARTICLE", 2: "IMAGE", 3: "VIDEO", 4: "GALLERY", 5: "OEMBED", 6: "AUTHOR", 7: "AGENCY", 8: "EDGE_SIDE_INCLUDE", 9: "CITATION", } Element_ElementType_value = map[string]int32{ "ELEMENT_TYPE_UNSPECIFIED": 0, "ARTICLE": 1, "IMAGE": 2, "VIDEO": 3, "GALLERY": 4, "OEMBED": 5, "AUTHOR": 6, "AGENCY": 7, "EDGE_SIDE_INCLUDE": 8, "CITATION": 9, } )
Enum value maps for Element_ElementType.
var ( Element_ElementRelation_name = map[int32]string{ 0: "ELEMENT_RELATION_UNSPECIFIED", 1: "OPENER", 2: "TEASER", } Element_ElementRelation_value = map[string]int32{ "ELEMENT_RELATION_UNSPECIFIED": 0, "OPENER": 1, "TEASER": 2, } )
Enum value maps for Element_ElementRelation.
var ( Asset_AssetType_name = map[int32]string{ 0: "ASSET_TYPE_UNSPECIFIED", 1: "IMAGE", 2: "VIDEO", 3: "URL", 4: "METADATA", } Asset_AssetType_value = map[string]int32{ "ASSET_TYPE_UNSPECIFIED": 0, "IMAGE": 1, "VIDEO": 2, "URL": 3, "METADATA": 4, } )
Enum value maps for Asset_AssetType.
var ArticleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stroeer.core.v1.ArticleService", HandlerType: (*ArticleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetArticle", Handler: _ArticleService_GetArticle_Handler, }, { MethodName: "ListArticles", Handler: _ArticleService_ListArticles_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stroeer/core/v1/core_article_service.proto", }
ArticleService_ServiceDesc is the grpc.ServiceDesc for ArticleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_stroeer_core_v1_article_proto protoreflect.FileDescriptor
var File_stroeer_core_v1_core_article_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterArticleServiceServer ¶
func RegisterArticleServiceServer(s grpc.ServiceRegistrar, srv ArticleServiceServer)
Types ¶
type Article ¶
type Article struct { //* // ## `id` // “`protobuf // int64 id = 1; // “` // Unique ID of the article defined by the content management system (required). Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //* // ## `type` // “`protobuf // ContentType type = 2; // “` // Main content type of the article (required). // See list of supported [`ContentType`](#enum-contenttype) Type Article_ContentType `protobuf:"varint,2,opt,name=type,proto3,enum=stroeer.core.v1.Article_ContentType" json:"type,omitempty"` //* // ## `sub_type` // “`protobuf // ContentSubType sub_type = 3; // “` // Subtype of the article. For `CONTENT_TYPE_ARTICLE` this field holds a // sub type, for others like `CONTENT_TYPE_GALLERY` it may not. // See list of supported [`ContentSubType`](#enum-contentsubtype) // SubType Article_ContentSubType `` /* 127-byte string literal not displayed */ //* // ## `section_tree` // “`protobuf // stroeer.core.v1.Reference section_tree = 4; // “` // Hierarchical section tree information of the article (required). // See [`Reference`](reference.html) // // Sample: // “`javascript // { // "label": "Home" // "href": "/", // "children": [ // "label": "Spielwiese (Tests)", // "href": "/test-playground/" // ] // } // “` SectionTree *Reference `protobuf:"bytes,4,opt,name=section_tree,json=sectionTree,proto3" json:"section_tree,omitempty"` //* // ## `fields` // “`protobuf // map<string, string> fields = 5; // “` // // Generic map containing general content and configuration information of // the article (required). // // The entry set is defined by the content management system and // will vary depending on the main type of the article. // // ⚠ Clients must be resilient to unknown or missing entries. ⚠ // // ### For `CONTENT_TYPE_ARTICLE` // // this map will contain the following data: // // | key | mandatory |description | // | --- | --------- | ------------| // | `headline` | * | the headline for this content | // | `top_line` | * | "dachzeile" | // | `ref_path` | * | URL path for this article e.g. `/${section_tree}/id_${id}/${title}.html` | // | `ref_canonical`| * | Canonical URL of this article, may differ if external, e.g. https://www.example.com/external.html | // | `ref_amp` | * | AMP URL of this article | // | `summary` | | summary for this content | // | `teaser_text` | | used on teasers, overrides `summary` | // | `meta_robots` | | | // | `social_headline` | | used for social markup, overrides `headline` | // | `headline_short` | | used for "Schlagzeilen", overrides `headline` | // | `meta_title` | | HTML `<meta title>` | // | `expert_line` | | | // | `social_description` | | | // | `meta_description` | | HTML `<meta description>` | // | `reading_time_minutes` | | estimated reading time in minutes | // // ### For `CONTENT_TYPE_GALLERY` // // this map will contain the following data: // // | key | mandatory |description | // | --- | --------- | ------------| // | `headline` | * | the headline for this content | // // Fields map[string]string `` /* 153-byte string literal not displayed */ //* // ## `body` // “`protobuf // Body body = 6; // “` // Recursive body structure of the article to render on detail pages. See [`BodyNode`](bodynode.html) // // This field will be `empty`/`null` for the teaser representation (e.g. section or overview pages) of the article. Body *Body `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` //* // ## `metadata` // “`protobuf // Metadata metadata = 7; // “` // Article metadata like publication state and technical timestamps. See [`Metadata`](metadata.html) Metadata *Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` //* // ## `elements` // “`protobuf // repeated Element elements = 8; // “` // Elements of the article which are not part of the body, e.g. author information // opener image/video etc. Those elements should be used to render the article // as a teaser e.g. on section pages. See [`Element`](element.html) Elements []*Element `protobuf:"bytes,8,rep,name=elements,proto3" json:"elements,omitempty"` //* // ## `keywords` // “`protobuf // repeated string keywords = 9; // “` // Extracted entities from the article body like people, places, organizations etc. Keywords []string `protobuf:"bytes,9,rep,name=keywords,proto3" json:"keywords,omitempty"` //* // ## `onwards` // “`protobuf // repeated int64 onwards = 10; // “` // IDs of articles related to this article. // // Related articles are defined manually in the content management system // by the editorial department. Onwards []int64 `protobuf:"varint,10,rep,packed,name=onwards,proto3" json:"onwards,omitempty"` // contains filtered or unexported fields }
* ```protobuf message Article {} ``` An article represents a piece of content created in the content management system. Different types of content like text or video articles share the same message structure, they can be distinguished by the [`Article.type`](#type) field.
Depending on the service used to retrieve an article, this message might only contain data required on section pages (e.g. with `Article.body` set to `null` thus not containing any data that is only required on detail pages). This is sometimes referred to as _Teaser_.
func (*Article) Descriptor
deprecated
func (*Article) GetElements ¶
func (*Article) GetKeywords ¶
func (*Article) GetMetadata ¶
func (*Article) GetOnwards ¶
func (*Article) GetSectionTree ¶
func (*Article) GetSubType ¶
func (x *Article) GetSubType() Article_ContentSubType
func (*Article) GetType ¶
func (x *Article) GetType() Article_ContentType
func (*Article) ProtoMessage ¶
func (*Article) ProtoMessage()
func (*Article) ProtoReflect ¶
func (x *Article) ProtoReflect() protoreflect.Message
type ArticleServiceClient ¶
type ArticleServiceClient interface { // Returns an article by it's `id` GetArticle(ctx context.Context, in *GetArticleRequest, opts ...grpc.CallOption) (*Article, error) // Returns pages of articles by their `home_section` ListArticles(ctx context.Context, in *ListArticlesRequest, opts ...grpc.CallOption) (*ListArticlesResponse, error) }
ArticleServiceClient is the client API for ArticleService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewArticleServiceClient ¶
func NewArticleServiceClient(cc grpc.ClientConnInterface) ArticleServiceClient
type ArticleServiceServer ¶
type ArticleServiceServer interface { // Returns an article by it's `id` GetArticle(context.Context, *GetArticleRequest) (*Article, error) // Returns pages of articles by their `home_section` ListArticles(context.Context, *ListArticlesRequest) (*ListArticlesResponse, error) // contains filtered or unexported methods }
ArticleServiceServer is the server API for ArticleService service. All implementations must embed UnimplementedArticleServiceServer for forward compatibility
type Article_ContentSubType ¶ added in v0.16.0
type Article_ContentSubType int32
* ## `enum ContentSubType` ```protobuf
enum ContentSubType { // Not specified. CONTENT_SUB_TYPE_UNSPECIFIED = 0; // Meldung/Nachricht — this is the default NEWS = 1; // 'Kolumne' COLUMN = 2; // 'Bericht' REPORT = 3; // 'Kommentar' COMMENTARY = 4; // 'Interview' INTERVIEW = 5; // 'Pro und Kontra/Streitgespräch' CONTROVERSY = 6; // 'Reportage' STORY = 7; // 'Rezension/Kritik' RECENSION = 8; // 'Tagesanbruch' TAGESANBRUCH = 9; // 'Analyse' ANALYSIS = 10; // 'Satire/Glosse' SATIRE = 11; // Content originally imported from agency/tickers by the CMS AGENCY_IMPORT = 12; }
```
const ( // Not specified. Article_CONTENT_SUB_TYPE_UNSPECIFIED Article_ContentSubType = 0 // Meldung/Nachricht — this is the default Article_NEWS Article_ContentSubType = 1 // 'Kolumne' Article_COLUMN Article_ContentSubType = 2 // 'Bericht' Article_REPORT Article_ContentSubType = 3 // 'Kommentar' Article_COMMENTARY Article_ContentSubType = 4 // 'Interview' Article_INTERVIEW Article_ContentSubType = 5 // 'Pro und Kontra/Streitgespräch' Article_CONTROVERSY Article_ContentSubType = 6 // 'Reportage' Article_STORY Article_ContentSubType = 7 // 'Rezension/Kritik' Article_RECENSION Article_ContentSubType = 8 // 'Tagesanbruch' Article_TAGESANBRUCH Article_ContentSubType = 9 // 'Analyse' Article_ANALYSIS Article_ContentSubType = 10 // 'Satire/Glosse' Article_SATIRE Article_ContentSubType = 11 // Content originally imported from agency/tickers by the CMS Article_AGENCY_IMPORT Article_ContentSubType = 12 )
func (Article_ContentSubType) Descriptor ¶ added in v0.16.0
func (Article_ContentSubType) Descriptor() protoreflect.EnumDescriptor
func (Article_ContentSubType) Enum ¶ added in v0.16.0
func (x Article_ContentSubType) Enum() *Article_ContentSubType
func (Article_ContentSubType) EnumDescriptor
deprecated
added in
v0.16.0
func (Article_ContentSubType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Article_ContentSubType.Descriptor instead.
func (Article_ContentSubType) Number ¶ added in v0.16.0
func (x Article_ContentSubType) Number() protoreflect.EnumNumber
func (Article_ContentSubType) String ¶ added in v0.16.0
func (x Article_ContentSubType) String() string
func (Article_ContentSubType) Type ¶ added in v0.16.0
func (Article_ContentSubType) Type() protoreflect.EnumType
type Article_ContentType ¶ added in v0.16.0
type Article_ContentType int32
* ## `enum ContentType` ```protobuf
enum ContentType { // Not specified. CONTENT_TYPE_UNSPECIFIED = 0; // A text article. ARTICLE = 1; // An image article (not available as standalone article). IMAGE = 2; // A video article. VIDEO = 3; // A gallery article. GALLERY = 4; // An oembed article. OEMBED = 5; // An author article (not available as standalone article). AUTHOR = 6; // An agency article (not available as standalone article). AGENCY = 7; }
```
const ( // Not specified. Article_CONTENT_TYPE_UNSPECIFIED Article_ContentType = 0 // A text article. Article_ARTICLE Article_ContentType = 1 // An image article (not available as standalone article). Article_IMAGE Article_ContentType = 2 // A video article. Article_VIDEO Article_ContentType = 3 // A gallery article. Article_GALLERY Article_ContentType = 4 // An oembed article. Article_OEMBED Article_ContentType = 5 // An author article (not available as standalone article). Article_AUTHOR Article_ContentType = 6 // An agency article (not available as standalone article). Article_AGENCY Article_ContentType = 7 )
func (Article_ContentType) Descriptor ¶ added in v0.16.0
func (Article_ContentType) Descriptor() protoreflect.EnumDescriptor
func (Article_ContentType) Enum ¶ added in v0.16.0
func (x Article_ContentType) Enum() *Article_ContentType
func (Article_ContentType) EnumDescriptor
deprecated
added in
v0.16.0
func (Article_ContentType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Article_ContentType.Descriptor instead.
func (Article_ContentType) Number ¶ added in v0.16.0
func (x Article_ContentType) Number() protoreflect.EnumNumber
func (Article_ContentType) String ¶ added in v0.16.0
func (x Article_ContentType) String() string
func (Article_ContentType) Type ¶ added in v0.16.0
func (Article_ContentType) Type() protoreflect.EnumType
type Asset ¶
type Asset struct { //* // ## `type` // Type of the asset. See [`AssetType`](#assettype) // “`protobuf //AssetType type = 1; //“` Type Asset_AssetType `protobuf:"varint,1,opt,name=type,proto3,enum=stroeer.core.v1.Asset_AssetType" json:"type,omitempty"` //* // ## `fields` // “`protobuf // map<string, string> fields = 2; // “` // Generic map containing general content and configuration information of // the asset. // // Clients must be resilient to unknown or missing entry sets. // Fields map[string]string `` /* 153-byte string literal not displayed */ //* // ## `metadata` // “`protobuf // Metadata metadata = 3; // “` // Technical metadata for this asset (state, validity, ...). See [`Metadata`](metadata.html) Metadata *Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*Asset) Descriptor
deprecated
func (*Asset) GetMetadata ¶
func (*Asset) GetType ¶
func (x *Asset) GetType() Asset_AssetType
func (*Asset) ProtoMessage ¶
func (*Asset) ProtoMessage()
func (*Asset) ProtoReflect ¶
func (x *Asset) ProtoReflect() protoreflect.Message
type Asset_AssetType ¶ added in v0.16.0
type Asset_AssetType int32
* ## `enum AssetType`
Type of an asset. ```protobuf
enum AssetType { // Not specified. ASSET_TYPE_UNSPECIFIED = 0; // An image asset. IMAGE = 1; // A video asset. VIDEO = 2; // An URL asset. URL = 3; // A metadata asset. METADATA = 4; }
```
const ( // Not specified. Asset_ASSET_TYPE_UNSPECIFIED Asset_AssetType = 0 // An image asset. Asset_IMAGE Asset_AssetType = 1 // A video asset. Asset_VIDEO Asset_AssetType = 2 // An URL asset. Asset_URL Asset_AssetType = 3 // A metadata asset. Asset_METADATA Asset_AssetType = 4 )
func (Asset_AssetType) Descriptor ¶ added in v0.16.0
func (Asset_AssetType) Descriptor() protoreflect.EnumDescriptor
func (Asset_AssetType) Enum ¶ added in v0.16.0
func (x Asset_AssetType) Enum() *Asset_AssetType
func (Asset_AssetType) EnumDescriptor
deprecated
added in
v0.16.0
func (Asset_AssetType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Asset_AssetType.Descriptor instead.
func (Asset_AssetType) Number ¶ added in v0.16.0
func (x Asset_AssetType) Number() protoreflect.EnumNumber
func (Asset_AssetType) String ¶ added in v0.16.0
func (x Asset_AssetType) String() string
func (Asset_AssetType) Type ¶ added in v0.16.0
func (Asset_AssetType) Type() protoreflect.EnumType
type Body ¶
type Body struct { //* // ## `children` // “`protobuf // repeated BodyNode children = 1; // “` // Recursive Body nodes. See [body nodes](bodynode.html). Children []*BodyNode `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` // contains filtered or unexported fields }
* ```protobuf message Body {} ``` Body of the article to render on detail pages.
func (*Body) Descriptor
deprecated
func (*Body) GetChildren ¶
func (*Body) ProtoMessage ¶
func (*Body) ProtoMessage()
func (*Body) ProtoReflect ¶
func (x *Body) ProtoReflect() protoreflect.Message
type BodyNode ¶
type BodyNode struct { //* // ## `type` // “`protobuf // string type = 1; // “` // Type of the node (required). // // ### HTML `types` // | type | description | // | -----| ------------| // | `text` | most basic `type`, its text value can be found in the `text` field. The `word_count` can be found in the `BodyNode.fields` for each `BodyNode[type=text]` | // | `p` | `paragraph` / `<p>` | // | `sub_headline` | a sub headline, may be part of the _table of contents_ | // | `a` | `anchor` / `<a>` | // | `strong` | `strong` / `<strong>` | // | `em` | `emphasis` / `<em>` | // | `br` | `line break` / `<br>` | // | `ul` | `unordered list` / `<ul>` | // | `ol` | `ordered list` / `<ol>` | // | `li` | `list` / `<li>` | // // ### Custom `types` // | type | description | // | -----| ------------| // | `img` | inline image element, check `elements` | // | `video` | inline video element, check `elements` | // | `gallery` | inline gallery element, check `elements` | // | `oembed` | inline oEmbed element, check `elements` | // | `disclaimer` | formatted text that holds a disclaimer, e.g. used in `/gesundheit/` or `/kaufbertatung/` | // | `infobox` | todo | // | `table_of_contents` | todo | // | `article_sources`| "Quellenapparat", list like structure containing `children[type=article_source]`. See [Samples](#article_sources). | // | `article_source` | A single "Quellenapparat" item usually containing `text` or `a` | // // ### Samples // // #### `disclaimer` // // “`json // { // "type": "disclaimer", // "children": [ // { // "type": "strong", // "children": [ // { // "type": "text", // "text": "Wichtiger Hinweis: " // } // ] // }, // { // "type": "text", // "text": "Die Informationen ersetzen ..." // } // ] // } // “` // // #### `article_sources` // “`json // { // "type": "article_sources", // "children": [ // { // "type": "article_source" // "children": [ // { // "type": "text", // "text": "Nachrichtenagenturen dpa und AFP" // } // ], // } // ] // } // “` Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` //* // ## `text` // “`protobuf // string text = 2; // “` // Text of the node, only set for text nodes (`type == 'text'`). Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` //* // ## `fields` // “`protobuf // map<string, string> fields = 3; // “` // Additional information for the node depending on it's type, // e.g. `href` for `a` nodes. Fields map[string]string `` /* 153-byte string literal not displayed */ //* // ## `children` // “`protobuf // repeated BodyNode children = 4; // “` // Children of the node, e.g. the `text` node of a `<p>` or a `<a>`. Children []*BodyNode `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"` //* // ## `elements` // “`protobuf // repeated Element elements = 5; // “` // [Elements](element.html) of the node, e.g. video, image, gallery, embed, ... Elements []*Element `protobuf:"bytes,5,rep,name=elements,proto3" json:"elements,omitempty"` // contains filtered or unexported fields }
* ```protobuf message BodyNode {} ``` Recursive body structure representing all types of possible body nodes inside an article.
Clients must be resilient to unknown or missing nodes.
func (*BodyNode) Descriptor
deprecated
func (*BodyNode) GetChildren ¶
func (*BodyNode) GetElements ¶
func (*BodyNode) ProtoMessage ¶
func (*BodyNode) ProtoMessage()
func (*BodyNode) ProtoReflect ¶
func (x *BodyNode) ProtoReflect() protoreflect.Message
type Element ¶
type Element struct { //* // ## `type` // “`protobuf // ElementType type = 1; // “` // [`Type`](#type-1) of the element. Type Element_ElementType `protobuf:"varint,1,opt,name=type,proto3,enum=stroeer.core.v1.Element_ElementType" json:"type,omitempty"` //* // ## `relations` // “`protobuf // repeated ElementRelation relations = 2; // “` // The usages (relations) of an element. // Example: // One image element with the relations `teaser` and `opener` is used for // both places. See [`enum ElementRelation`](#enum-elementrelation) Relations []Element_ElementRelation `protobuf:"varint,2,rep,packed,name=relations,proto3,enum=stroeer.core.v1.Element_ElementRelation" json:"relations,omitempty"` //* // ## `asset` // “`protobuf // repeated Asset assets = 3; // “` // [`Asset(s)`](asset.html) of the element like images, videos or metadata (required). Assets []*Asset `protobuf:"bytes,3,rep,name=assets,proto3" json:"assets,omitempty"` //* // ## `children` // “`protobuf // repeated Element children = 4; // “` // Children of the element. Some Elements can have nested elements themself, // see sample section for `video` and `gallery` elements. Children []*Element `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"` // contains filtered or unexported fields }
* ```protobuf message Element {} ``` Elements of the article which are not part of the body, e.g. author information opener image/video etc. Those elements should be used to render the article as a teaser e.g. on section pages.
Different types of elements like images or videos share the same message structure distinguished by the `ElementType` field.
func (*Element) Descriptor
deprecated
func (*Element) GetChildren ¶
func (*Element) GetRelations ¶
func (x *Element) GetRelations() []Element_ElementRelation
func (*Element) GetType ¶
func (x *Element) GetType() Element_ElementType
func (*Element) ProtoMessage ¶
func (*Element) ProtoMessage()
func (*Element) ProtoReflect ¶
func (x *Element) ProtoReflect() protoreflect.Message
type Element_ElementRelation ¶ added in v0.16.0
type Element_ElementRelation int32
* ## Enum ElementRelation ```protobuf
enum ElementRelation { // Not specified. ELEMENT_RELATION_UNSPECIFIED = 0; // As an opener element OPENER = 1; // As an teaser element TEASER = 2; }
``` Relation or usage of an element
const ( // Not specified. Element_ELEMENT_RELATION_UNSPECIFIED Element_ElementRelation = 0 // As an opener element (within the content) Element_OPENER Element_ElementRelation = 1 // As an teaser element (when externally viewed) Element_TEASER Element_ElementRelation = 2 )
func (Element_ElementRelation) Descriptor ¶ added in v0.16.0
func (Element_ElementRelation) Descriptor() protoreflect.EnumDescriptor
func (Element_ElementRelation) Enum ¶ added in v0.16.0
func (x Element_ElementRelation) Enum() *Element_ElementRelation
func (Element_ElementRelation) EnumDescriptor
deprecated
added in
v0.16.0
func (Element_ElementRelation) EnumDescriptor() ([]byte, []int)
Deprecated: Use Element_ElementRelation.Descriptor instead.
func (Element_ElementRelation) Number ¶ added in v0.16.0
func (x Element_ElementRelation) Number() protoreflect.EnumNumber
func (Element_ElementRelation) String ¶ added in v0.16.0
func (x Element_ElementRelation) String() string
func (Element_ElementRelation) Type ¶ added in v0.16.0
func (Element_ElementRelation) Type() protoreflect.EnumType
type Element_ElementType ¶ added in v0.16.0
type Element_ElementType int32
* ## `type`
Type of an element.
```protobuf
enum ElementType { // Not specified, not supported or yet unknown. ELEMENT_TYPE_UNSPECIFIED = 0; // An article element. ARTICLE = 1; // An image element. IMAGE = 2; // A video element. VIDEO = 3; // A gallery element. GALLERY = 4; // An oembed element. OEMBED = 5; // An author element. AUTHOR = 6; // An agency (e.g. DPA) element. AGENCY = 7; // An element that represents a <esi:include>, it's important // to be rendered server side due to SEO reasons EDGE_SIDE_INCLUDE = 8; // A citation element. CITATION = 9; }
```
const ( // Not specified, not supported or yet unknown. Element_ELEMENT_TYPE_UNSPECIFIED Element_ElementType = 0 // An article element. Element_ARTICLE Element_ElementType = 1 // An image element. Element_IMAGE Element_ElementType = 2 // A video element. Element_VIDEO Element_ElementType = 3 // A gallery element. Element_GALLERY Element_ElementType = 4 // An oembed element. Element_OEMBED Element_ElementType = 5 // An author element. Element_AUTHOR Element_ElementType = 6 // An agency (e.g. DPA) element. Element_AGENCY Element_ElementType = 7 // An element that represents a <esi:include>, it's important // to be rendered server side due to SEO reasons Element_EDGE_SIDE_INCLUDE Element_ElementType = 8 // A citation element. Element_CITATION Element_ElementType = 9 )
func (Element_ElementType) Descriptor ¶ added in v0.16.0
func (Element_ElementType) Descriptor() protoreflect.EnumDescriptor
func (Element_ElementType) Enum ¶ added in v0.16.0
func (x Element_ElementType) Enum() *Element_ElementType
func (Element_ElementType) EnumDescriptor
deprecated
added in
v0.16.0
func (Element_ElementType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Element_ElementType.Descriptor instead.
func (Element_ElementType) Number ¶ added in v0.16.0
func (x Element_ElementType) Number() protoreflect.EnumNumber
func (Element_ElementType) String ¶ added in v0.16.0
func (x Element_ElementType) String() string
func (Element_ElementType) Type ¶ added in v0.16.0
func (Element_ElementType) Type() protoreflect.EnumType
type GetArticleRequest ¶
type GetArticleRequest struct { // ID of the article defined by the content management system (required). Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Request message to get an article.
func (*GetArticleRequest) Descriptor
deprecated
func (*GetArticleRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetArticleRequest.ProtoReflect.Descriptor instead.
func (*GetArticleRequest) GetId ¶
func (x *GetArticleRequest) GetId() int64
func (*GetArticleRequest) ProtoMessage ¶
func (*GetArticleRequest) ProtoMessage()
func (*GetArticleRequest) ProtoReflect ¶
func (x *GetArticleRequest) ProtoReflect() protoreflect.Message
func (*GetArticleRequest) Reset ¶
func (x *GetArticleRequest) Reset()
func (*GetArticleRequest) String ¶
func (x *GetArticleRequest) String() string
type ListArticlesRequest ¶ added in v0.17.0
type ListArticlesRequest struct { // mandatory: valid section_path, with leading and trailing slash // e.g. `/sport/` SectionPath string `protobuf:"bytes,1,opt,name=section_path,json=sectionPath,proto3" json:"section_path,omitempty"` // The maximum number of articles to return. The service may return fewer than // this value. // If unspecified, at most 10 articles will be returned. // The maximum value is 100; values above 100 will be coerced to 100. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // A page token, received from a previous `ListArticles` call. // Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to `ListArticles` must match // the call that provided the page token. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
func (*ListArticlesRequest) Descriptor
deprecated
added in
v0.17.0
func (*ListArticlesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListArticlesRequest.ProtoReflect.Descriptor instead.
func (*ListArticlesRequest) GetPageSize ¶ added in v0.17.0
func (x *ListArticlesRequest) GetPageSize() int32
func (*ListArticlesRequest) GetPageToken ¶ added in v0.17.0
func (x *ListArticlesRequest) GetPageToken() string
func (*ListArticlesRequest) GetSectionPath ¶ added in v0.17.0
func (x *ListArticlesRequest) GetSectionPath() string
func (*ListArticlesRequest) ProtoMessage ¶ added in v0.17.0
func (*ListArticlesRequest) ProtoMessage()
func (*ListArticlesRequest) ProtoReflect ¶ added in v0.17.0
func (x *ListArticlesRequest) ProtoReflect() protoreflect.Message
func (*ListArticlesRequest) Reset ¶ added in v0.17.0
func (x *ListArticlesRequest) Reset()
func (*ListArticlesRequest) String ¶ added in v0.17.0
func (x *ListArticlesRequest) String() string
type ListArticlesResponse ¶ added in v0.17.0
type ListArticlesResponse struct { Articles []*Article `protobuf:"bytes,1,rep,name=articles,proto3" json:"articles,omitempty"` // A token that can be sent as `page_token` to retrieve the next page. // If this field is omitted, there are no subsequent pages. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
func (*ListArticlesResponse) Descriptor
deprecated
added in
v0.17.0
func (*ListArticlesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListArticlesResponse.ProtoReflect.Descriptor instead.
func (*ListArticlesResponse) GetArticles ¶ added in v0.17.0
func (x *ListArticlesResponse) GetArticles() []*Article
func (*ListArticlesResponse) GetNextPageToken ¶ added in v0.17.0
func (x *ListArticlesResponse) GetNextPageToken() string
func (*ListArticlesResponse) ProtoMessage ¶ added in v0.17.0
func (*ListArticlesResponse) ProtoMessage()
func (*ListArticlesResponse) ProtoReflect ¶ added in v0.17.0
func (x *ListArticlesResponse) ProtoReflect() protoreflect.Message
func (*ListArticlesResponse) Reset ¶ added in v0.17.0
func (x *ListArticlesResponse) Reset()
func (*ListArticlesResponse) String ¶ added in v0.17.0
func (x *ListArticlesResponse) String() string
type Metadata ¶
type Metadata struct { //* // ## `state` // “`protobuf // State state = 1; // “` // State of the article in the content management system. See [`enum State`](#enum-state) State Metadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=stroeer.core.v1.Metadata_State" json:"state,omitempty"` //* // ## `start_time` // “`protobuf // google.protobuf.Timestamp start_time = 2; // “` // Manually set editorial timestamp (_Gültig von_) at which the article is valid to deliver on // digital platforms in seconds of UTC time since Unix epoch. StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` //* // ## `end_time` // “`protobuf // google.protobuf.Timestamp end_time = 3; // “` // Manually set editorial date (_Gültig bis_) till the article is valid to deliver on // digital platforms in seconds of UTC time since Unix epoch. EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` //* // ## `publish_time` // “`protobuf // google.protobuf.Timestamp publish_time = 4; // “` // Editorial date (_Publikationsdatum_) of the first publication of the // article in seconds of UTC time since Unix epoch. // // This date will be set automatically by the content management system. PublishTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=publish_time,json=publishTime,proto3" json:"publish_time,omitempty"` //* // ## `update_time` // “`protobuf // google.protobuf.Timestamp update_time = 5; // “` // Editorial date (_Aktualisierungsdatum_) at which the article // was updated in seconds of UTC time since Unix epoch. // // On first publication this timestamp matches `publish_time`. Afterwards // it's either updated manually in the content management system or // automatically if the article content changed significantly. UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` //* // ## `transformation_time` // “`protobuf // google.protobuf.Timestamp transformation_time = 6; // “` // Technical timestamp at which the article was transformed in the // API layer in seconds of UTC time since Unix epoch. TransformationTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=transformation_time,json=transformationTime,proto3" json:"transformation_time,omitempty"` //* // ## `transformation_errors` //“`protobuf // int64 transformation_errors = 7; //“` // Number of errors occurred while fetching and/or transforming optional // article components (e.g. embeds) to an `article` message. TransformationErrors int64 `protobuf:"varint,7,opt,name=transformation_errors,json=transformationErrors,proto3" json:"transformation_errors,omitempty"` // contains filtered or unexported fields }
* ```protobuf message Metadata {} ``` Article metadata like publication state and technical timestamps.
func (*Metadata) Descriptor
deprecated
func (*Metadata) GetEndTime ¶
func (x *Metadata) GetEndTime() *timestamppb.Timestamp
func (*Metadata) GetPublishTime ¶
func (x *Metadata) GetPublishTime() *timestamppb.Timestamp
func (*Metadata) GetStartTime ¶
func (x *Metadata) GetStartTime() *timestamppb.Timestamp
func (*Metadata) GetState ¶
func (x *Metadata) GetState() Metadata_State
func (*Metadata) GetTransformationErrors ¶
func (*Metadata) GetTransformationTime ¶
func (x *Metadata) GetTransformationTime() *timestamppb.Timestamp
func (*Metadata) GetUpdateTime ¶
func (x *Metadata) GetUpdateTime() *timestamppb.Timestamp
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type Metadata_State ¶ added in v0.16.0
type Metadata_State int32
* ## `enum State`
State of the item ([`Article`](article.html), [`Element`](element.html)) in the content management system. The `state` in combination with [start_time](#start_time) and [end_time](#end_time) determines whether or not this item should be rendered; this must be respected by all consumers especially when content is duplicated or cached.
The terms `deleted` (articles) and `archived` (media lib) are interchangeable/synonyms. This message combines those two into `State.DELETED`.
An Article is in `State.DRAFT` if it has never been published, or if the [start_time](#start_time) lies in the future.
```protobuf
enum State { STATE_UNSPECIFIED = 0; PUBLISHED = 1; DELETED = 2; DRAFT = 3; }
```
const ( Metadata_STATE_UNSPECIFIED Metadata_State = 0 Metadata_PUBLISHED Metadata_State = 1 Metadata_DELETED Metadata_State = 2 Metadata_DRAFT Metadata_State = 3 )
func (Metadata_State) Descriptor ¶ added in v0.16.0
func (Metadata_State) Descriptor() protoreflect.EnumDescriptor
func (Metadata_State) Enum ¶ added in v0.16.0
func (x Metadata_State) Enum() *Metadata_State
func (Metadata_State) EnumDescriptor
deprecated
added in
v0.16.0
func (Metadata_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Metadata_State.Descriptor instead.
func (Metadata_State) Number ¶ added in v0.16.0
func (x Metadata_State) Number() protoreflect.EnumNumber
func (Metadata_State) String ¶ added in v0.16.0
func (x Metadata_State) String() string
func (Metadata_State) Type ¶ added in v0.16.0
func (Metadata_State) Type() protoreflect.EnumType
type Reference ¶
type Reference struct { //* // The `type` is used for filtering in a list of references. // It describes a use-case, which usually has a defined render position. // // Example entries: // * `unspecified` // * `stage_title` // * `stage_themenbereiche` // * `stage_header_links` // * `stage_top_themen` // * `stage_tag_category` // “`protobuf // string type = 1; // “` Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` //* // The text or label of the reference. // “`protobuf // string label = 2; // “` Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` //* // The href of the reference. It can be relative or absolute. // “`protobuf // string href = 3; // “` Href string `protobuf:"bytes,3,opt,name=href,proto3" json:"href,omitempty"` //* // Contains all optional attributes of the reference. // * `target` // * `rel` // * `flag:internal` // * `layout` // // Clients must be resilient to unknown or missing entry sets. // “`protobuf // map<string, string> fields = 4; // “` Fields map[string]string `` /* 153-byte string literal not displayed */ //* // Hierarchically structured references for representing a navigation or tree. // “`protobuf // repeated Reference children = 5; // “` Children []*Reference `protobuf:"bytes,5,rep,name=children,proto3" json:"children,omitempty"` // contains filtered or unexported fields }
* A Reference represents a link to another entity, for example an `Article`, a `Section` or an external website, or a whole tree structure, for example a section tree or navigation. ```protobuf message Reference {} ```
func (*Reference) Descriptor
deprecated
func (*Reference) GetChildren ¶
func (*Reference) ProtoMessage ¶
func (*Reference) ProtoMessage()
func (*Reference) ProtoReflect ¶
func (x *Reference) ProtoReflect() protoreflect.Message
type UnimplementedArticleServiceServer ¶
type UnimplementedArticleServiceServer struct { }
UnimplementedArticleServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedArticleServiceServer) GetArticle ¶
func (UnimplementedArticleServiceServer) GetArticle(context.Context, *GetArticleRequest) (*Article, error)
func (UnimplementedArticleServiceServer) ListArticles ¶ added in v0.17.0
func (UnimplementedArticleServiceServer) ListArticles(context.Context, *ListArticlesRequest) (*ListArticlesResponse, error)
type UnsafeArticleServiceServer ¶
type UnsafeArticleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeArticleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ArticleServiceServer will result in compilation errors.