revision_common

package
v1.4.1-RC1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RevisionService

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

RevisionService user service

func NewRevisionService

func NewRevisionService(revisionRepo revision.RevisionRepo,
	userRepo usercommon.UserRepo,
) *RevisionService

func (*RevisionService) AddRevision

func (rs *RevisionService) AddRevision(ctx context.Context, req *schema.AddRevisionDTO, autoUpdateRevisionID bool) (
	revisionID string, err error)

AddRevision add revision

autoUpdateRevisionID bool : if autoUpdateRevisionID is true , the object.revision_id will be updated, if not need auto update object.revision_id, it must be false. example: user can edit the object, but need audit, the revision_id will be updated when admin approved

func (*RevisionService) ExistUnreviewedByObjectID

func (rs *RevisionService) ExistUnreviewedByObjectID(ctx context.Context, objectID string) (revision *entity.Revision, exist bool, err error)

ExistUnreviewedByObjectID

func (*RevisionService) GetRevision

func (rs *RevisionService) GetRevision(ctx context.Context, revisionID string) (
	revision *entity.Revision, err error)

GetRevision get revision

func (*RevisionService) GetUnreviewedRevisionCount

func (rs *RevisionService) GetUnreviewedRevisionCount(ctx context.Context, req *schema.RevisionSearch) (count int64, err error)

Jump to

Keyboard shortcuts

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