v1

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicDocument_QueryDocumentList_FullMethodName   = "/api.public.document.v1.PublicDocument/QueryDocumentList"
	PublicDocument_QueryDocumentDetail_FullMethodName = "/api.public.document.v1.PublicDocument/QueryDocumentDetail"
)
View Source
const OperationPublicDocumentQueryDocumentDetail = "/api.public.document.v1.PublicDocument/QueryDocumentDetail"
View Source
const OperationPublicDocumentQueryDocumentList = "/api.public.document.v1.PublicDocument/QueryDocumentList"

Variables

View Source
var File_public_document_v1_document_proto protoreflect.FileDescriptor
View Source
var PublicDocument_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.public.document.v1.PublicDocument",
	HandlerType: (*PublicDocumentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryDocumentList",
			Handler:    _PublicDocument_QueryDocumentList_Handler,
		},
		{
			MethodName: "QueryDocumentDetail",
			Handler:    _PublicDocument_QueryDocumentDetail_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "public/document/v1/document.proto",
}

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

Functions

func RegisterPublicDocumentHTTPServer

func RegisterPublicDocumentHTTPServer(s *http.Server, srv PublicDocumentHTTPServer)

func RegisterPublicDocumentServer

func RegisterPublicDocumentServer(s grpc.ServiceRegistrar, srv PublicDocumentServer)

Types

type Document

type Document struct {
	Id        int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title     string   `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Content   string   `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	Tags      []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	Show      bool     `protobuf:"varint,5,opt,name=show,proto3" json:"show,omitempty"`
	CreatedAt int64    `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt int64    `protobuf:"varint,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Document 文档

func (*Document) Descriptor deprecated

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

Deprecated: Use Document.ProtoReflect.Descriptor instead.

func (*Document) GetContent

func (x *Document) GetContent() string

func (*Document) GetCreatedAt

func (x *Document) GetCreatedAt() int64

func (*Document) GetId

func (x *Document) GetId() int64

func (*Document) GetShow

func (x *Document) GetShow() bool

func (*Document) GetTags

func (x *Document) GetTags() []string

func (*Document) GetTitle

func (x *Document) GetTitle() string

func (*Document) GetUpdatedAt

func (x *Document) GetUpdatedAt() int64

func (*Document) ProtoMessage

func (*Document) ProtoMessage()

func (*Document) ProtoReflect

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

func (*Document) Reset

func (x *Document) Reset()

func (*Document) String

func (x *Document) String() string

func (*Document) Validate

func (m *Document) Validate() error

Validate checks the field values on Document with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Document) ValidateAll

func (m *Document) ValidateAll() error

ValidateAll checks the field values on Document with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DocumentMultiError, or nil if none found.

type DocumentDetailReply

type DocumentDetailReply struct {
	Id        int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title     string   `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Content   string   `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	Tags      []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	Show      bool     `protobuf:"varint,5,opt,name=show,proto3" json:"show,omitempty"`
	CreatedAt int64    `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt int64    `protobuf:"varint,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

DocumentDetailReply 查询文档详情响应

func (*DocumentDetailReply) Descriptor deprecated

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

Deprecated: Use DocumentDetailReply.ProtoReflect.Descriptor instead.

func (*DocumentDetailReply) GetContent

func (x *DocumentDetailReply) GetContent() string

func (*DocumentDetailReply) GetCreatedAt

func (x *DocumentDetailReply) GetCreatedAt() int64

func (*DocumentDetailReply) GetId

func (x *DocumentDetailReply) GetId() int64

func (*DocumentDetailReply) GetShow

func (x *DocumentDetailReply) GetShow() bool

func (*DocumentDetailReply) GetTags

func (x *DocumentDetailReply) GetTags() []string

func (*DocumentDetailReply) GetTitle

func (x *DocumentDetailReply) GetTitle() string

func (*DocumentDetailReply) GetUpdatedAt

func (x *DocumentDetailReply) GetUpdatedAt() int64

func (*DocumentDetailReply) ProtoMessage

func (*DocumentDetailReply) ProtoMessage()

func (*DocumentDetailReply) ProtoReflect

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

func (*DocumentDetailReply) Reset

func (x *DocumentDetailReply) Reset()

func (*DocumentDetailReply) String

func (x *DocumentDetailReply) String() string

func (*DocumentDetailReply) Validate

func (m *DocumentDetailReply) Validate() error

Validate checks the field values on DocumentDetailReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DocumentDetailReply) ValidateAll

func (m *DocumentDetailReply) ValidateAll() error

ValidateAll checks the field values on DocumentDetailReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DocumentDetailReplyMultiError, or nil if none found.

type DocumentDetailReplyMultiError

type DocumentDetailReplyMultiError []error

DocumentDetailReplyMultiError is an error wrapping multiple validation errors returned by DocumentDetailReply.ValidateAll() if the designated constraints aren't met.

func (DocumentDetailReplyMultiError) AllErrors

func (m DocumentDetailReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DocumentDetailReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type DocumentDetailReplyValidationError

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

DocumentDetailReplyValidationError is the validation error returned by DocumentDetailReply.Validate if the designated constraints aren't met.

func (DocumentDetailReplyValidationError) Cause

Cause function returns cause value.

func (DocumentDetailReplyValidationError) Error

Error satisfies the builtin error interface

func (DocumentDetailReplyValidationError) ErrorName

ErrorName returns error name.

func (DocumentDetailReplyValidationError) Field

Field function returns field value.

func (DocumentDetailReplyValidationError) Key

Key function returns key value.

func (DocumentDetailReplyValidationError) Reason

Reason function returns reason value.

type DocumentListReply

type DocumentListReply struct {
	Total int32       `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	List  []*Document `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

DocumentListReply 查询文档列表响应

func (*DocumentListReply) Descriptor deprecated

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

Deprecated: Use DocumentListReply.ProtoReflect.Descriptor instead.

func (*DocumentListReply) GetList

func (x *DocumentListReply) GetList() []*Document

func (*DocumentListReply) GetTotal

func (x *DocumentListReply) GetTotal() int32

func (*DocumentListReply) ProtoMessage

func (*DocumentListReply) ProtoMessage()

func (*DocumentListReply) ProtoReflect

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

func (*DocumentListReply) Reset

func (x *DocumentListReply) Reset()

func (*DocumentListReply) String

func (x *DocumentListReply) String() string

func (*DocumentListReply) Validate

func (m *DocumentListReply) Validate() error

Validate checks the field values on DocumentListReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DocumentListReply) ValidateAll

func (m *DocumentListReply) ValidateAll() error

ValidateAll checks the field values on DocumentListReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DocumentListReplyMultiError, or nil if none found.

type DocumentListReplyMultiError

type DocumentListReplyMultiError []error

DocumentListReplyMultiError is an error wrapping multiple validation errors returned by DocumentListReply.ValidateAll() if the designated constraints aren't met.

func (DocumentListReplyMultiError) AllErrors

func (m DocumentListReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DocumentListReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type DocumentListReplyValidationError

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

DocumentListReplyValidationError is the validation error returned by DocumentListReply.Validate if the designated constraints aren't met.

func (DocumentListReplyValidationError) Cause

Cause function returns cause value.

func (DocumentListReplyValidationError) Error

Error satisfies the builtin error interface

func (DocumentListReplyValidationError) ErrorName

ErrorName returns error name.

func (DocumentListReplyValidationError) Field

Field function returns field value.

func (DocumentListReplyValidationError) Key

Key function returns key value.

func (DocumentListReplyValidationError) Reason

Reason function returns reason value.

type DocumentMultiError

type DocumentMultiError []error

DocumentMultiError is an error wrapping multiple validation errors returned by Document.ValidateAll() if the designated constraints aren't met.

func (DocumentMultiError) AllErrors

func (m DocumentMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DocumentMultiError) Error

func (m DocumentMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DocumentValidationError

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

DocumentValidationError is the validation error returned by Document.Validate if the designated constraints aren't met.

func (DocumentValidationError) Cause

func (e DocumentValidationError) Cause() error

Cause function returns cause value.

func (DocumentValidationError) Error

func (e DocumentValidationError) Error() string

Error satisfies the builtin error interface

func (DocumentValidationError) ErrorName

func (e DocumentValidationError) ErrorName() string

ErrorName returns error name.

func (DocumentValidationError) Field

func (e DocumentValidationError) Field() string

Field function returns field value.

func (DocumentValidationError) Key

func (e DocumentValidationError) Key() bool

Key function returns key value.

func (DocumentValidationError) Reason

func (e DocumentValidationError) Reason() string

Reason function returns reason value.

type PublicDocumentClient

type PublicDocumentClient interface {
	// QueryDocumentList 查询文档列表
	QueryDocumentList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DocumentListReply, error)
	// QueryDocumentDetail 查询文档详情
	QueryDocumentDetail(ctx context.Context, in *QueryDocumentDetailRequest, opts ...grpc.CallOption) (*DocumentDetailReply, error)
}

PublicDocumentClient is the client API for PublicDocument 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.

Public Document service 公共文档服务(需要认证)

type PublicDocumentHTTPClient

type PublicDocumentHTTPClient interface {
	// QueryDocumentDetail QueryDocumentDetail 查询文档详情
	QueryDocumentDetail(ctx context.Context, req *QueryDocumentDetailRequest, opts ...http.CallOption) (rsp *DocumentDetailReply, err error)
	// QueryDocumentList QueryDocumentList 查询文档列表
	QueryDocumentList(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *DocumentListReply, err error)
}

func NewPublicDocumentHTTPClient

func NewPublicDocumentHTTPClient(client *http.Client) PublicDocumentHTTPClient

type PublicDocumentHTTPClientImpl

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

func (*PublicDocumentHTTPClientImpl) QueryDocumentDetail

QueryDocumentDetail QueryDocumentDetail 查询文档详情

func (*PublicDocumentHTTPClientImpl) QueryDocumentList

func (c *PublicDocumentHTTPClientImpl) QueryDocumentList(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*DocumentListReply, error)

QueryDocumentList QueryDocumentList 查询文档列表

type PublicDocumentHTTPServer

type PublicDocumentHTTPServer interface {
	// QueryDocumentDetail QueryDocumentDetail 查询文档详情
	QueryDocumentDetail(context.Context, *QueryDocumentDetailRequest) (*DocumentDetailReply, error)
	// QueryDocumentList QueryDocumentList 查询文档列表
	QueryDocumentList(context.Context, *emptypb.Empty) (*DocumentListReply, error)
}

type PublicDocumentServer

type PublicDocumentServer interface {
	// QueryDocumentList 查询文档列表
	QueryDocumentList(context.Context, *emptypb.Empty) (*DocumentListReply, error)
	// QueryDocumentDetail 查询文档详情
	QueryDocumentDetail(context.Context, *QueryDocumentDetailRequest) (*DocumentDetailReply, error)
	// contains filtered or unexported methods
}

PublicDocumentServer is the server API for PublicDocument service. All implementations must embed UnimplementedPublicDocumentServer for forward compatibility.

Public Document service 公共文档服务(需要认证)

type QueryDocumentDetailRequest

type QueryDocumentDetailRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

QueryDocumentDetailRequest 查询文档详情请求

func (*QueryDocumentDetailRequest) Descriptor deprecated

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

Deprecated: Use QueryDocumentDetailRequest.ProtoReflect.Descriptor instead.

func (*QueryDocumentDetailRequest) GetId

func (x *QueryDocumentDetailRequest) GetId() int64

func (*QueryDocumentDetailRequest) ProtoMessage

func (*QueryDocumentDetailRequest) ProtoMessage()

func (*QueryDocumentDetailRequest) ProtoReflect

func (*QueryDocumentDetailRequest) Reset

func (x *QueryDocumentDetailRequest) Reset()

func (*QueryDocumentDetailRequest) String

func (x *QueryDocumentDetailRequest) String() string

func (*QueryDocumentDetailRequest) Validate

func (m *QueryDocumentDetailRequest) Validate() error

Validate checks the field values on QueryDocumentDetailRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*QueryDocumentDetailRequest) ValidateAll

func (m *QueryDocumentDetailRequest) ValidateAll() error

ValidateAll checks the field values on QueryDocumentDetailRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in QueryDocumentDetailRequestMultiError, or nil if none found.

type QueryDocumentDetailRequestMultiError

type QueryDocumentDetailRequestMultiError []error

QueryDocumentDetailRequestMultiError is an error wrapping multiple validation errors returned by QueryDocumentDetailRequest.ValidateAll() if the designated constraints aren't met.

func (QueryDocumentDetailRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (QueryDocumentDetailRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type QueryDocumentDetailRequestValidationError

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

QueryDocumentDetailRequestValidationError is the validation error returned by QueryDocumentDetailRequest.Validate if the designated constraints aren't met.

func (QueryDocumentDetailRequestValidationError) Cause

Cause function returns cause value.

func (QueryDocumentDetailRequestValidationError) Error

Error satisfies the builtin error interface

func (QueryDocumentDetailRequestValidationError) ErrorName

ErrorName returns error name.

func (QueryDocumentDetailRequestValidationError) Field

Field function returns field value.

func (QueryDocumentDetailRequestValidationError) Key

Key function returns key value.

func (QueryDocumentDetailRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedPublicDocumentServer

type UnimplementedPublicDocumentServer struct{}

UnimplementedPublicDocumentServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedPublicDocumentServer) QueryDocumentDetail

func (UnimplementedPublicDocumentServer) QueryDocumentList

type UnsafePublicDocumentServer

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

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

Jump to

Keyboard shortcuts

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