revision_common

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 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 added in v0.5.0

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

ExistUnreviewedByObjectID

func (*RevisionService) GetRevision added in v0.5.0

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

GetRevision get revision

func (*RevisionService) GetUnreviewedRevisionCount added in v0.5.0

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