notice

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: AGPL-3.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notice

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

Notice 公告

func New

func New(options ...Option) *Notice

New 新建 notice service

func (*Notice) Convert

func (n *Notice) Convert(notice *dao.Notice) *apistructs.Notice

Convert 结构转换

func (*Notice) Create

func (n *Notice) Create(orgID uint64, createReq *apistructs.NoticeCreateRequest) (uint64, error)

Create 创建公告

func (*Notice) Delete

func (n *Notice) Delete(noticeID uint64) error

Delete 删除公告

func (*Notice) Get

func (n *Notice) Get(noticeID uint64) (*apistructs.Notice, error)

Get 获取公告

func (*Notice) List

List 公告列表

func (*Notice) Publish

func (n *Notice) Publish(noticeID uint64) error

Publish 发布公告

func (*Notice) Unpublish

func (n *Notice) Unpublish(noticeID uint64) error

Unpublish 停用公告

func (*Notice) Update

func (n *Notice) Update(updateReq *apistructs.NoticeUpdateRequest) error

Update 编辑公告

type Option

type Option func(*Notice)

Option .

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 设置 dbclient

Jump to

Keyboard shortcuts

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