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: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Announcement_QueryAnnouncement_FullMethodName = "/api.public.announcement.v1.Announcement/QueryAnnouncement"
)
View Source
const OperationAnnouncementQueryAnnouncement = "/api.public.announcement.v1.Announcement/QueryAnnouncement"

Variables

View Source
var Announcement_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.public.announcement.v1.Announcement",
	HandlerType: (*AnnouncementServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryAnnouncement",
			Handler:    _Announcement_QueryAnnouncement_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "public/announcement/v1/announcement.proto",
}

Announcement_ServiceDesc is the grpc.ServiceDesc for Announcement 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_public_announcement_v1_announcement_proto protoreflect.FileDescriptor

Functions

func RegisterAnnouncementHTTPServer

func RegisterAnnouncementHTTPServer(s *http.Server, srv AnnouncementHTTPServer)

func RegisterAnnouncementServer

func RegisterAnnouncementServer(s grpc.ServiceRegistrar, srv AnnouncementServer)

Types

type AnnouncementClient

type AnnouncementClient interface {
	// QueryAnnouncement 查询公告列表
	QueryAnnouncement(ctx context.Context, in *QueryAnnouncementRequest, opts ...grpc.CallOption) (*QueryAnnouncementReply, error)
}

AnnouncementClient is the client API for Announcement 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 Announcement service 公共公告服务(需要认证)

type AnnouncementHTTPClient

type AnnouncementHTTPClient interface {
	// QueryAnnouncement QueryAnnouncement 查询公告列表
	QueryAnnouncement(ctx context.Context, req *QueryAnnouncementRequest, opts ...http.CallOption) (rsp *QueryAnnouncementReply, err error)
}

func NewAnnouncementHTTPClient

func NewAnnouncementHTTPClient(client *http.Client) AnnouncementHTTPClient

type AnnouncementHTTPClientImpl

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

func (*AnnouncementHTTPClientImpl) QueryAnnouncement

QueryAnnouncement QueryAnnouncement 查询公告列表

type AnnouncementHTTPServer

type AnnouncementHTTPServer interface {
	// QueryAnnouncement QueryAnnouncement 查询公告列表
	QueryAnnouncement(context.Context, *QueryAnnouncementRequest) (*QueryAnnouncementReply, error)
}

type AnnouncementItem

type AnnouncementItem 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"`
	Show      *bool  `protobuf:"varint,4,opt,name=show,proto3,oneof" json:"show,omitempty"`
	Pinned    *bool  `protobuf:"varint,5,opt,name=pinned,proto3,oneof" json:"pinned,omitempty"`
	Popup     *bool  `protobuf:"varint,6,opt,name=popup,proto3,oneof" json:"popup,omitempty"`
	CreatedAt int64  `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt int64  `protobuf:"varint,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

AnnouncementItem 公告项

func (*AnnouncementItem) Descriptor deprecated

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

Deprecated: Use AnnouncementItem.ProtoReflect.Descriptor instead.

func (*AnnouncementItem) GetContent

func (x *AnnouncementItem) GetContent() string

func (*AnnouncementItem) GetCreatedAt

func (x *AnnouncementItem) GetCreatedAt() int64

func (*AnnouncementItem) GetId

func (x *AnnouncementItem) GetId() int64

func (*AnnouncementItem) GetPinned

func (x *AnnouncementItem) GetPinned() bool

func (*AnnouncementItem) GetPopup

func (x *AnnouncementItem) GetPopup() bool

func (*AnnouncementItem) GetShow

func (x *AnnouncementItem) GetShow() bool

func (*AnnouncementItem) GetTitle

func (x *AnnouncementItem) GetTitle() string

func (*AnnouncementItem) GetUpdatedAt

func (x *AnnouncementItem) GetUpdatedAt() int64

func (*AnnouncementItem) ProtoMessage

func (*AnnouncementItem) ProtoMessage()

func (*AnnouncementItem) ProtoReflect

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

func (*AnnouncementItem) Reset

func (x *AnnouncementItem) Reset()

func (*AnnouncementItem) String

func (x *AnnouncementItem) String() string

func (*AnnouncementItem) Validate

func (m *AnnouncementItem) Validate() error

Validate checks the field values on AnnouncementItem 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 (*AnnouncementItem) ValidateAll

func (m *AnnouncementItem) ValidateAll() error

ValidateAll checks the field values on AnnouncementItem 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 AnnouncementItemMultiError, or nil if none found.

type AnnouncementItemMultiError

type AnnouncementItemMultiError []error

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

func (AnnouncementItemMultiError) AllErrors

func (m AnnouncementItemMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AnnouncementItemMultiError) Error

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

type AnnouncementItemValidationError

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

AnnouncementItemValidationError is the validation error returned by AnnouncementItem.Validate if the designated constraints aren't met.

func (AnnouncementItemValidationError) Cause

Cause function returns cause value.

func (AnnouncementItemValidationError) Error

Error satisfies the builtin error interface

func (AnnouncementItemValidationError) ErrorName

ErrorName returns error name.

func (AnnouncementItemValidationError) Field

Field function returns field value.

func (AnnouncementItemValidationError) Key

Key function returns key value.

func (AnnouncementItemValidationError) Reason

Reason function returns reason value.

type AnnouncementServer

type AnnouncementServer interface {
	// QueryAnnouncement 查询公告列表
	QueryAnnouncement(context.Context, *QueryAnnouncementRequest) (*QueryAnnouncementReply, error)
	// contains filtered or unexported methods
}

AnnouncementServer is the server API for Announcement service. All implementations must embed UnimplementedAnnouncementServer for forward compatibility.

Public Announcement service 公共公告服务(需要认证)

type QueryAnnouncementReply

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

func (*QueryAnnouncementReply) Descriptor deprecated

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

Deprecated: Use QueryAnnouncementReply.ProtoReflect.Descriptor instead.

func (*QueryAnnouncementReply) GetAnnouncements

func (x *QueryAnnouncementReply) GetAnnouncements() []*AnnouncementItem

func (*QueryAnnouncementReply) GetTotal

func (x *QueryAnnouncementReply) GetTotal() int32

func (*QueryAnnouncementReply) ProtoMessage

func (*QueryAnnouncementReply) ProtoMessage()

func (*QueryAnnouncementReply) ProtoReflect

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

func (*QueryAnnouncementReply) Reset

func (x *QueryAnnouncementReply) Reset()

func (*QueryAnnouncementReply) String

func (x *QueryAnnouncementReply) String() string

func (*QueryAnnouncementReply) Validate

func (m *QueryAnnouncementReply) Validate() error

Validate checks the field values on QueryAnnouncementReply 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 (*QueryAnnouncementReply) ValidateAll

func (m *QueryAnnouncementReply) ValidateAll() error

ValidateAll checks the field values on QueryAnnouncementReply 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 QueryAnnouncementReplyMultiError, or nil if none found.

type QueryAnnouncementReplyMultiError

type QueryAnnouncementReplyMultiError []error

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

func (QueryAnnouncementReplyMultiError) AllErrors

func (m QueryAnnouncementReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (QueryAnnouncementReplyMultiError) Error

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

type QueryAnnouncementReplyValidationError

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

QueryAnnouncementReplyValidationError is the validation error returned by QueryAnnouncementReply.Validate if the designated constraints aren't met.

func (QueryAnnouncementReplyValidationError) Cause

Cause function returns cause value.

func (QueryAnnouncementReplyValidationError) Error

Error satisfies the builtin error interface

func (QueryAnnouncementReplyValidationError) ErrorName

ErrorName returns error name.

func (QueryAnnouncementReplyValidationError) Field

Field function returns field value.

func (QueryAnnouncementReplyValidationError) Key

Key function returns key value.

func (QueryAnnouncementReplyValidationError) Reason

Reason function returns reason value.

type QueryAnnouncementRequest

type QueryAnnouncementRequest struct {
	Page   int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	Size   int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Pinned *bool `protobuf:"varint,3,opt,name=pinned,proto3,oneof" json:"pinned,omitempty"`
	Popup  *bool `protobuf:"varint,4,opt,name=popup,proto3,oneof" json:"popup,omitempty"`
	// contains filtered or unexported fields
}

QueryAnnouncementRequest 查询公告请求

func (*QueryAnnouncementRequest) Descriptor deprecated

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

Deprecated: Use QueryAnnouncementRequest.ProtoReflect.Descriptor instead.

func (*QueryAnnouncementRequest) GetPage

func (x *QueryAnnouncementRequest) GetPage() int32

func (*QueryAnnouncementRequest) GetPinned

func (x *QueryAnnouncementRequest) GetPinned() bool

func (*QueryAnnouncementRequest) GetPopup

func (x *QueryAnnouncementRequest) GetPopup() bool

func (*QueryAnnouncementRequest) GetSize

func (x *QueryAnnouncementRequest) GetSize() int32

func (*QueryAnnouncementRequest) ProtoMessage

func (*QueryAnnouncementRequest) ProtoMessage()

func (*QueryAnnouncementRequest) ProtoReflect

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

func (*QueryAnnouncementRequest) Reset

func (x *QueryAnnouncementRequest) Reset()

func (*QueryAnnouncementRequest) String

func (x *QueryAnnouncementRequest) String() string

func (*QueryAnnouncementRequest) Validate

func (m *QueryAnnouncementRequest) Validate() error

Validate checks the field values on QueryAnnouncementRequest 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 (*QueryAnnouncementRequest) ValidateAll

func (m *QueryAnnouncementRequest) ValidateAll() error

ValidateAll checks the field values on QueryAnnouncementRequest 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 QueryAnnouncementRequestMultiError, or nil if none found.

type QueryAnnouncementRequestMultiError

type QueryAnnouncementRequestMultiError []error

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

func (QueryAnnouncementRequestMultiError) AllErrors

func (m QueryAnnouncementRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (QueryAnnouncementRequestMultiError) Error

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

type QueryAnnouncementRequestValidationError

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

QueryAnnouncementRequestValidationError is the validation error returned by QueryAnnouncementRequest.Validate if the designated constraints aren't met.

func (QueryAnnouncementRequestValidationError) Cause

Cause function returns cause value.

func (QueryAnnouncementRequestValidationError) Error

Error satisfies the builtin error interface

func (QueryAnnouncementRequestValidationError) ErrorName

ErrorName returns error name.

func (QueryAnnouncementRequestValidationError) Field

Field function returns field value.

func (QueryAnnouncementRequestValidationError) Key

Key function returns key value.

func (QueryAnnouncementRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedAnnouncementServer

type UnimplementedAnnouncementServer struct{}

UnimplementedAnnouncementServer 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 (UnimplementedAnnouncementServer) QueryAnnouncement

type UnsafeAnnouncementServer

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

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

Jump to

Keyboard shortcuts

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