content

package
v0.0.0-...-522cb6f Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: BSD-2-Clause Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ContentService_GetContentBySlug_FullMethodName = "/dictybase.content.ContentService/GetContentBySlug"
	ContentService_GetContent_FullMethodName       = "/dictybase.content.ContentService/GetContent"
	ContentService_StoreContent_FullMethodName     = "/dictybase.content.ContentService/StoreContent"
	ContentService_UpdateContent_FullMethodName    = "/dictybase.content.ContentService/UpdateContent"
	ContentService_DeleteContent_FullMethodName    = "/dictybase.content.ContentService/DeleteContent"
	ContentService_Healthz_FullMethodName          = "/dictybase.content.ContentService/Healthz"
)

Variables

View Source
var ContentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dictybase.content.ContentService",
	HandlerType: (*ContentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetContentBySlug",
			Handler:    _ContentService_GetContentBySlug_Handler,
		},
		{
			MethodName: "GetContent",
			Handler:    _ContentService_GetContent_Handler,
		},
		{
			MethodName: "StoreContent",
			Handler:    _ContentService_StoreContent_Handler,
		},
		{
			MethodName: "UpdateContent",
			Handler:    _ContentService_UpdateContent_Handler,
		},
		{
			MethodName: "DeleteContent",
			Handler:    _ContentService_DeleteContent_Handler,
		},
		{
			MethodName: "Healthz",
			Handler:    _ContentService_Healthz_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "dictybase/content/content.proto",
}

ContentService_ServiceDesc is the grpc.ServiceDesc for ContentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_dictybase_content_content_proto protoreflect.FileDescriptor

Functions

func RegisterContentServiceServer

func RegisterContentServiceServer(s grpc.ServiceRegistrar, srv ContentServiceServer)

Types

type Content

type Content struct {
	Data  *ContentData   `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Links *jsonapi.Links `protobuf:"bytes,2,opt,name=links,proto3" json:"links,omitempty"`
	// contains filtered or unexported fields
}

func (*Content) Descriptor deprecated

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

Deprecated: Use Content.ProtoReflect.Descriptor instead.

func (*Content) GetData

func (x *Content) GetData() *ContentData
func (x *Content) GetLinks() *jsonapi.Links

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) ProtoReflect

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

func (*Content) Reset

func (x *Content) Reset()

func (*Content) String

func (x *Content) String() string

func (*Content) Validate

func (this *Content) Validate() error

type ContentAttributes

type ContentAttributes struct {

	// page name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// page slug. Look here https://en.wikipedia.org/wiki/Semantic_URL#Slug to know about slug
	Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"`
	// email id of the user who created the content
	CreatedBy string `protobuf:"bytes,3,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	// email id of the user who updated the content
	UpdatedBy string `protobuf:"bytes,4,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"`
	// Timestamp for creation and update
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// serialized page content(for example serialized draft js object)
	Content string `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"`
	// namespace for the page
	Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

Definition of various content fields

func (*ContentAttributes) Descriptor deprecated

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

Deprecated: Use ContentAttributes.ProtoReflect.Descriptor instead.

func (*ContentAttributes) GetContent

func (x *ContentAttributes) GetContent() string

func (*ContentAttributes) GetCreatedAt

func (x *ContentAttributes) GetCreatedAt() *timestamppb.Timestamp

func (*ContentAttributes) GetCreatedBy

func (x *ContentAttributes) GetCreatedBy() string

func (*ContentAttributes) GetName

func (x *ContentAttributes) GetName() string

func (*ContentAttributes) GetNamespace

func (x *ContentAttributes) GetNamespace() string

func (*ContentAttributes) GetSlug

func (x *ContentAttributes) GetSlug() string

func (*ContentAttributes) GetUpdatedAt

func (x *ContentAttributes) GetUpdatedAt() *timestamppb.Timestamp

func (*ContentAttributes) GetUpdatedBy

func (x *ContentAttributes) GetUpdatedBy() string

func (*ContentAttributes) ProtoMessage

func (*ContentAttributes) ProtoMessage()

func (*ContentAttributes) ProtoReflect

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

func (*ContentAttributes) Reset

func (x *ContentAttributes) Reset()

func (*ContentAttributes) String

func (x *ContentAttributes) String() string

func (*ContentAttributes) Validate

func (this *ContentAttributes) Validate() error

type ContentData

type ContentData struct {

	// The resource name
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Unique id
	Id         int64              `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Attributes *ContentAttributes `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"`
	Links      *jsonapi.Links     `protobuf:"bytes,4,opt,name=links,proto3" json:"links,omitempty"`
	// contains filtered or unexported fields
}

func (*ContentData) Descriptor deprecated

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

Deprecated: Use ContentData.ProtoReflect.Descriptor instead.

func (*ContentData) GetAttributes

func (x *ContentData) GetAttributes() *ContentAttributes

func (*ContentData) GetId

func (x *ContentData) GetId() int64
func (x *ContentData) GetLinks() *jsonapi.Links

func (*ContentData) GetType

func (x *ContentData) GetType() string

func (*ContentData) ProtoMessage

func (*ContentData) ProtoMessage()

func (*ContentData) ProtoReflect

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

func (*ContentData) Reset

func (x *ContentData) Reset()

func (*ContentData) String

func (x *ContentData) String() string

func (*ContentData) Validate

func (this *ContentData) Validate() error

type ContentIdRequest

type ContentIdRequest struct {

	// Unique id to identify content
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ContentIdRequest) Descriptor deprecated

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

Deprecated: Use ContentIdRequest.ProtoReflect.Descriptor instead.

func (*ContentIdRequest) GetId

func (x *ContentIdRequest) GetId() int64

func (*ContentIdRequest) ProtoMessage

func (*ContentIdRequest) ProtoMessage()

func (*ContentIdRequest) ProtoReflect

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

func (*ContentIdRequest) Reset

func (x *ContentIdRequest) Reset()

func (*ContentIdRequest) String

func (x *ContentIdRequest) String() string

func (*ContentIdRequest) Validate

func (this *ContentIdRequest) Validate() error

type ContentRequest

type ContentRequest struct {

	// Url slug
	// Look here https://en.wikipedia.org/wiki/Semantic_URL#Slug to know about slug
	// The slug name should be unique
	Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
	// contains filtered or unexported fields
}

func (*ContentRequest) Descriptor deprecated

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

Deprecated: Use ContentRequest.ProtoReflect.Descriptor instead.

func (*ContentRequest) GetSlug

func (x *ContentRequest) GetSlug() string

func (*ContentRequest) ProtoMessage

func (*ContentRequest) ProtoMessage()

func (*ContentRequest) ProtoReflect

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

func (*ContentRequest) Reset

func (x *ContentRequest) Reset()

func (*ContentRequest) String

func (x *ContentRequest) String() string

func (*ContentRequest) Validate

func (this *ContentRequest) Validate() error

type ContentServiceClient

type ContentServiceClient interface {
	// Gets the content of specified page(slug)
	GetContentBySlug(ctx context.Context, in *ContentRequest, opts ...grpc.CallOption) (*Content, error)
	GetContent(ctx context.Context, in *ContentIdRequest, opts ...grpc.CallOption) (*Content, error)
	// Store the content of a new page(slug)
	StoreContent(ctx context.Context, in *StoreContentRequest, opts ...grpc.CallOption) (*Content, error)
	// Update the content of an existing page
	UpdateContent(ctx context.Context, in *UpdateContentRequest, opts ...grpc.CallOption) (*Content, error)
	// Delete an existing page along with its content
	DeleteContent(ctx context.Context, in *ContentIdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Basic health check that always return success
	Healthz(ctx context.Context, in *jsonapi.HealthzIdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ContentServiceClient is the client API for ContentService 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.

type ContentServiceServer

type ContentServiceServer interface {
	// Gets the content of specified page(slug)
	GetContentBySlug(context.Context, *ContentRequest) (*Content, error)
	GetContent(context.Context, *ContentIdRequest) (*Content, error)
	// Store the content of a new page(slug)
	StoreContent(context.Context, *StoreContentRequest) (*Content, error)
	// Update the content of an existing page
	UpdateContent(context.Context, *UpdateContentRequest) (*Content, error)
	// Delete an existing page along with its content
	DeleteContent(context.Context, *ContentIdRequest) (*emptypb.Empty, error)
	// Basic health check that always return success
	Healthz(context.Context, *jsonapi.HealthzIdRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ContentServiceServer is the server API for ContentService service. All implementations must embed UnimplementedContentServiceServer for forward compatibility

type ExistingContentAttributes

type ExistingContentAttributes struct {

	// email id of the user who is updating this content
	UpdatedBy string `protobuf:"bytes,1,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"`
	// serialized page content(for example serialized draft js object)
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

Fields that can be updated Changing either or both of name and namespace attributes alter the slug for the page

func (*ExistingContentAttributes) Descriptor deprecated

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

Deprecated: Use ExistingContentAttributes.ProtoReflect.Descriptor instead.

func (*ExistingContentAttributes) GetContent

func (x *ExistingContentAttributes) GetContent() string

func (*ExistingContentAttributes) GetUpdatedBy

func (x *ExistingContentAttributes) GetUpdatedBy() string

func (*ExistingContentAttributes) ProtoMessage

func (*ExistingContentAttributes) ProtoMessage()

func (*ExistingContentAttributes) ProtoReflect

func (*ExistingContentAttributes) Reset

func (x *ExistingContentAttributes) Reset()

func (*ExistingContentAttributes) String

func (x *ExistingContentAttributes) String() string

func (*ExistingContentAttributes) Validate

func (this *ExistingContentAttributes) Validate() error

type NewContentAttributes

type NewContentAttributes struct {

	// page name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// email of the user who is creating this content
	CreatedBy string `protobuf:"bytes,2,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	// page content, expected to be serialized `JSON` string.
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// namespace for the page, it is prepended to the
	// name to generate an unique slug.
	Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// page slug. Look here https://en.wikipedia.org/wiki/Semantic_URL#Slug to know about slug
	Slug string `protobuf:"bytes,5,opt,name=slug,proto3" json:"slug,omitempty"`
	// contains filtered or unexported fields
}

Definition for fields that are needed for storing the content

func (*NewContentAttributes) Descriptor deprecated

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

Deprecated: Use NewContentAttributes.ProtoReflect.Descriptor instead.

func (*NewContentAttributes) GetContent

func (x *NewContentAttributes) GetContent() string

func (*NewContentAttributes) GetCreatedBy

func (x *NewContentAttributes) GetCreatedBy() string

func (*NewContentAttributes) GetName

func (x *NewContentAttributes) GetName() string

func (*NewContentAttributes) GetNamespace

func (x *NewContentAttributes) GetNamespace() string

func (*NewContentAttributes) GetSlug

func (x *NewContentAttributes) GetSlug() string

func (*NewContentAttributes) ProtoMessage

func (*NewContentAttributes) ProtoMessage()

func (*NewContentAttributes) ProtoReflect

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

func (*NewContentAttributes) Reset

func (x *NewContentAttributes) Reset()

func (*NewContentAttributes) String

func (x *NewContentAttributes) String() string

func (*NewContentAttributes) Validate

func (this *NewContentAttributes) Validate() error

type StoreContentRequest

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

Definition for storing new content

func (*StoreContentRequest) Descriptor deprecated

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

Deprecated: Use StoreContentRequest.ProtoReflect.Descriptor instead.

func (*StoreContentRequest) GetData

func (*StoreContentRequest) ProtoMessage

func (*StoreContentRequest) ProtoMessage()

func (*StoreContentRequest) ProtoReflect

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

func (*StoreContentRequest) Reset

func (x *StoreContentRequest) Reset()

func (*StoreContentRequest) String

func (x *StoreContentRequest) String() string

func (*StoreContentRequest) Validate

func (this *StoreContentRequest) Validate() error

type StoreContentRequest_Data

type StoreContentRequest_Data struct {

	// resource name
	Type       string                `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Attributes *NewContentAttributes `protobuf:"bytes,2,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

func (*StoreContentRequest_Data) Descriptor deprecated

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

Deprecated: Use StoreContentRequest_Data.ProtoReflect.Descriptor instead.

func (*StoreContentRequest_Data) GetAttributes

func (x *StoreContentRequest_Data) GetAttributes() *NewContentAttributes

func (*StoreContentRequest_Data) GetType

func (x *StoreContentRequest_Data) GetType() string

func (*StoreContentRequest_Data) ProtoMessage

func (*StoreContentRequest_Data) ProtoMessage()

func (*StoreContentRequest_Data) ProtoReflect

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

func (*StoreContentRequest_Data) Reset

func (x *StoreContentRequest_Data) Reset()

func (*StoreContentRequest_Data) String

func (x *StoreContentRequest_Data) String() string

func (*StoreContentRequest_Data) Validate

func (this *StoreContentRequest_Data) Validate() error

type UnimplementedContentServiceServer

type UnimplementedContentServiceServer struct {
}

UnimplementedContentServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedContentServiceServer) DeleteContent

func (UnimplementedContentServiceServer) GetContent

func (UnimplementedContentServiceServer) GetContentBySlug

func (UnimplementedContentServiceServer) Healthz

func (UnimplementedContentServiceServer) StoreContent

func (UnimplementedContentServiceServer) UpdateContent

type UnsafeContentServiceServer

type UnsafeContentServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeContentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ContentServiceServer will result in compilation errors.

type UpdateContentRequest

type UpdateContentRequest struct {
	Data *UpdateContentRequest_Data `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Id   int64                      `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// An optional mask specifying which fields to update.
	// Presence of this field allow partial updates.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateContentRequest) Descriptor deprecated

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

Deprecated: Use UpdateContentRequest.ProtoReflect.Descriptor instead.

func (*UpdateContentRequest) GetData

func (*UpdateContentRequest) GetId

func (x *UpdateContentRequest) GetId() int64

func (*UpdateContentRequest) GetUpdateMask

func (x *UpdateContentRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateContentRequest) ProtoMessage

func (*UpdateContentRequest) ProtoMessage()

func (*UpdateContentRequest) ProtoReflect

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

func (*UpdateContentRequest) Reset

func (x *UpdateContentRequest) Reset()

func (*UpdateContentRequest) String

func (x *UpdateContentRequest) String() string

func (*UpdateContentRequest) Validate

func (this *UpdateContentRequest) Validate() error

type UpdateContentRequest_Data

type UpdateContentRequest_Data struct {

	// resource name
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// unique id
	Id         int64                      `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Attributes *ExistingContentAttributes `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateContentRequest_Data) Descriptor deprecated

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

Deprecated: Use UpdateContentRequest_Data.ProtoReflect.Descriptor instead.

func (*UpdateContentRequest_Data) GetAttributes

func (*UpdateContentRequest_Data) GetId

func (x *UpdateContentRequest_Data) GetId() int64

func (*UpdateContentRequest_Data) GetType

func (x *UpdateContentRequest_Data) GetType() string

func (*UpdateContentRequest_Data) ProtoMessage

func (*UpdateContentRequest_Data) ProtoMessage()

func (*UpdateContentRequest_Data) ProtoReflect

func (*UpdateContentRequest_Data) Reset

func (x *UpdateContentRequest_Data) Reset()

func (*UpdateContentRequest_Data) String

func (x *UpdateContentRequest_Data) String() string

func (*UpdateContentRequest_Data) Validate

func (this *UpdateContentRequest_Data) Validate() error

Jump to

Keyboard shortcuts

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