audit

package
v1.3.0-rc.0...-d217119 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidOrg          = "ErrInvalidOrg"
	ErrInvalidProjectInOrg = "ErrInvalidProjectInOrg"
	ErrInvalidAppInOrg     = "ErrInvalidAppInOrg"
	ErrInvalidAppInProject = "ErrInvalidAppInProject"
)

audit log err i18n key

Variables

This section is empty.

Functions

This section is empty.

Types

type Audit

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

Audit 成员操作封装

func New

func New(options ...Option) *Audit

New 新建 Audit 实例

func (*Audit) BatchCreateAudit

func (a *Audit) BatchCreateAudit(reqs []apistructs.Audit) error

BatchCreateAudit 批量创建审计

func (*Audit) Create

func (a *Audit) Create(req apistructs.AuditCreateRequest) error

Create 创建审计事件

func (*Audit) ExportExcel

func (a *Audit) ExportExcel(ctx context.Context, audits []model.Audit) (io.Reader, string, error)

ExportExcel 导出审计到excel

func (*Audit) GetAllAppIdByOrgId

func (a *Audit) GetAllAppIdByOrgId(orgId uint64) ([]uint64, error)

GetAllAppIdByOrgId get appIds By OrgId

func (*Audit) GetAllAppIdByProjectIds

func (a *Audit) GetAllAppIdByProjectIds(projectIds []uint64) ([]uint64, error)

GetAllAppIdByProjectIds batch get appId By ProjectIds

func (*Audit) GetAllProjectIdInOrg

func (a *Audit) GetAllProjectIdInOrg(orgId uint64) ([]uint64, error)

GetAllProjectIdInOrg Get all the projectId List in org

func (*Audit) GetAuditCleanCron

func (a *Audit) GetAuditCleanCron(orgID int64) (*apistructs.AuditListCleanCronResponseData, error)

GetAuditCleanCron 获取审计事件周期

func (*Audit) List

func (a *Audit) List(ctx context.Context, param *apistructs.AuditsListRequest) (int, []model.Audit, error)

List Filter Audit Logs By param

func (*Audit) UpdateAuditCleanCron

func (a *Audit) UpdateAuditCleanCron(orgID, interval int64) error

UpdateAuditCleanCron 更新审计事件周期

type Option

type Option func(*Audit)

Option 定义 Member 对象配置选项

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 配置 db client

func WithTrans

func WithTrans(trans i18n.Translator) Option

WithTrans sets the i18n.Translator

func WithUCClient

func WithUCClient(uc userpb.UserServiceServer) Option

WithUCClient 配置 uc client

Jump to

Keyboard shortcuts

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