blogv1

package
v0.0.0-...-5579da3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TagColor_name = map[int32]string{
		0: "TAG_COLOR_UNSPECIFIED",
		1: "TAG_COLOR_BLUE",
	}
	TagColor_value = map[string]int32{
		"TAG_COLOR_UNSPECIFIED": 0,
		"TAG_COLOR_BLUE":        1,
	}
)

Enum value maps for TagColor.

View Source
var File_examples_blog_v1_blog_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BitmapImage

type BitmapImage struct {

	// src of the bitmap image.
	Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
	// contains filtered or unexported fields
}

BitmapImage visualizer.

func (*BitmapImage) Descriptor deprecated

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

Deprecated: Use BitmapImage.ProtoReflect.Descriptor instead.

func (*BitmapImage) GetSrc

func (x *BitmapImage) GetSrc() string

func (*BitmapImage) ProtoMessage

func (*BitmapImage) ProtoMessage()

func (*BitmapImage) ProtoReflect

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

func (*BitmapImage) Reset

func (x *BitmapImage) Reset()

func (*BitmapImage) String

func (x *BitmapImage) String() string

type BlogAuthor

type BlogAuthor struct {

	// first name
	FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	// last name
	LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	// date of birth
	DateOfBirth *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=date_of_birth,json=dateOfBirth,proto3" json:"date_of_birth,omitempty"`
	// contains filtered or unexported fields
}

Some partial for a blog author

func (*BlogAuthor) Descriptor deprecated

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

Deprecated: Use BlogAuthor.ProtoReflect.Descriptor instead.

func (*BlogAuthor) GetDateOfBirth

func (x *BlogAuthor) GetDateOfBirth() *timestamppb.Timestamp

func (*BlogAuthor) GetFirstName

func (x *BlogAuthor) GetFirstName() string

func (*BlogAuthor) GetLastName

func (x *BlogAuthor) GetLastName() string

func (*BlogAuthor) ProtoMessage

func (*BlogAuthor) ProtoMessage()

func (*BlogAuthor) ProtoReflect

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

func (*BlogAuthor) Reset

func (x *BlogAuthor) Reset()

func (*BlogAuthor) String

func (x *BlogAuthor) String() string

type BlogPost

type BlogPost struct {

	// Title of the post
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// author of the blog post
	Author *BlogAuthor `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"`
	// tags fo the flog post
	Tags []*Tag `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	// image for the blog post
	//
	// Types that are assignable to Image:
	//
	//	*BlogPost_Vector
	//	*BlogPost_Bitmap
	Image isBlogPost_Image `protobuf_oneof:"image"`
	// related blog posts
	Related map[string]*BlogPost `` /* 155-byte string literal not displayed */
	// metadata
	Metadata *structpb.Struct `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

BlogPost describes the blog post

func (*BlogPost) Descriptor deprecated

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

Deprecated: Use BlogPost.ProtoReflect.Descriptor instead.

func (*BlogPost) GetAuthor

func (x *BlogPost) GetAuthor() *BlogAuthor

func (*BlogPost) GetBitmap

func (x *BlogPost) GetBitmap() *BitmapImage

func (*BlogPost) GetImage

func (m *BlogPost) GetImage() isBlogPost_Image

func (*BlogPost) GetMetadata

func (x *BlogPost) GetMetadata() *structpb.Struct

func (*BlogPost) GetRelated

func (x *BlogPost) GetRelated() map[string]*BlogPost

func (*BlogPost) GetTags

func (x *BlogPost) GetTags() []*Tag

func (*BlogPost) GetTitle

func (x *BlogPost) GetTitle() string

func (*BlogPost) GetVector

func (x *BlogPost) GetVector() *VectorImage

func (*BlogPost) ProtoMessage

func (*BlogPost) ProtoMessage()

func (*BlogPost) ProtoReflect

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

func (*BlogPost) Reset

func (x *BlogPost) Reset()

func (*BlogPost) String

func (x *BlogPost) String() string

type BlogPost_Bitmap

type BlogPost_Bitmap struct {
	// bitmap image
	Bitmap *BitmapImage `protobuf:"bytes,5,opt,name=bitmap,proto3,oneof"`
}

type BlogPost_Vector

type BlogPost_Vector struct {
	// vector image
	Vector *VectorImage `protobuf:"bytes,4,opt,name=vector,proto3,oneof"`
}

type Foo

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

Message foo

func (*Foo) Descriptor deprecated

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

Deprecated: Use Foo.ProtoReflect.Descriptor instead.

func (*Foo) ProtoMessage

func (*Foo) ProtoMessage()

func (*Foo) ProtoReflect

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

func (*Foo) Reset

func (x *Foo) Reset()

func (*Foo) String

func (x *Foo) String() string

type Tag

type Tag struct {

	// slug for the tag
	Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
	// human readable label
	Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
	// color of tag
	Color TagColor `protobuf:"varint,3,opt,name=color,proto3,enum=examples.blog.v1.TagColor" json:"color,omitempty"`
	// contains filtered or unexported fields
}

Tag for a blog post

func (*Tag) Descriptor deprecated

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

Deprecated: Use Tag.ProtoReflect.Descriptor instead.

func (*Tag) GetColor

func (x *Tag) GetColor() TagColor

func (*Tag) GetLabel

func (x *Tag) GetLabel() string

func (*Tag) GetSlug

func (x *Tag) GetSlug() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) ProtoReflect

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

func (*Tag) Reset

func (x *Tag) Reset()

func (*Tag) String

func (x *Tag) String() string

type TagColor

type TagColor int32

Kind of tag

const (
	// When no color is specified
	TagColor_TAG_COLOR_UNSPECIFIED TagColor = 0
	// blue tag
	TagColor_TAG_COLOR_BLUE TagColor = 1
)

func (TagColor) Descriptor

func (TagColor) Descriptor() protoreflect.EnumDescriptor

func (TagColor) Enum

func (x TagColor) Enum() *TagColor

func (TagColor) EnumDescriptor deprecated

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

Deprecated: Use TagColor.Descriptor instead.

func (TagColor) Number

func (x TagColor) Number() protoreflect.EnumNumber

func (TagColor) String

func (x TagColor) String() string

func (TagColor) Type

type VectorImage

type VectorImage struct {

	// src of the vector image.
	Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
	// contains filtered or unexported fields
}

VectorImage can be used for blog posts.

func (*VectorImage) Descriptor deprecated

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

Deprecated: Use VectorImage.ProtoReflect.Descriptor instead.

func (*VectorImage) GetSrc

func (x *VectorImage) GetSrc() string

func (*VectorImage) ProtoMessage

func (*VectorImage) ProtoMessage()

func (*VectorImage) ProtoReflect

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

func (*VectorImage) Reset

func (x *VectorImage) Reset()

func (*VectorImage) String

func (x *VectorImage) String() string

Jump to

Keyboard shortcuts

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