controller

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TIMEOUT = 10 * time.Second

Variables

View Source
var ResourcesEffectedByUserDelete_BATCH_SIZE int64 = 1000

Functions

This section is empty.

Types

type Controller

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

func New

func New(config config.Config, db database.Database) (ctrl *Controller, err error)

func (*Controller) Cleanup added in v0.0.11

func (this *Controller) Cleanup() (permissionsRemoved int, processesRemoved int, err error)

func (*Controller) CreateProcess added in v0.0.11

func (this *Controller) CreateProcess(token auth.Token, process model.Process) (result model.Process, err error, code int)

func (*Controller) DeleteProcess

func (this *Controller) DeleteProcess(token auth.Token, id string) (error, int)

func (*Controller) GetProcessModelName

func (this *Controller) GetProcessModelName(bpmn string) (name string, err error)

func (*Controller) HandleUserDelete

func (this *Controller) HandleUserDelete(userId string) error

func (*Controller) ListProcesses added in v0.0.9

func (this *Controller) ListProcesses(token auth.Token, options model.ListOptions) (result []model.Process, total int64, err error, code int)

func (*Controller) ReadAllPublicProcess

func (this *Controller) ReadAllPublicProcess() (result []model.Process, err error, code int)

func (*Controller) ReadProcess

func (this *Controller) ReadProcess(token auth.Token, id string, action model.AuthAction) (result model.Process, err error, errCode int)

func (*Controller) ResourcesEffectedByUserDelete

func (this *Controller) ResourcesEffectedByUserDelete(token auth.Token, resource string) (deleteResourceIds []string, deleteUserFromResource []client.Resource, err error)

func (*Controller) RunMigrations added in v0.0.9

func (this *Controller) RunMigrations() error

func (*Controller) SetProcess

func (this *Controller) SetProcess(owner string, process model.Process) error

func (*Controller) StartCleanupLoop added in v0.0.11

func (this *Controller) StartCleanupLoop(ctx context.Context, interval time.Duration)

func (*Controller) UpdateProcess added in v0.0.11

func (this *Controller) UpdateProcess(token auth.Token, id string, process model.Process) (result model.Process, err error, code int)

func (*Controller) UpdateProcessPublic added in v0.0.11

func (this *Controller) UpdateProcessPublic(token auth.Token, id string, publicCommand model.PublicCommand) (result model.Process, err error, code int)

type PermSearchElement

type PermSearchElement struct {
	Id                string            `json:"id"`
	Name              string            `json:"name"`
	Shared            bool              `json:"shared"`
	Creator           string            `json:"creator"`
	PermissionHolders PermissionHolders `json:"permission_holders"`
}

type PermissionHolders

type PermissionHolders struct {
	AdminUsers   []string `json:"admin_users"`
	ReadUsers    []string `json:"read_users"`
	WriteUsers   []string `json:"write_users"`
	ExecuteUsers []string `json:"execute_users"`
}

type Producer

type Producer interface {
	PublishProcessPut(id string, userId string, process model.Process) error
	PublishProcessDelete(id string, userId string) error
}

Jump to

Keyboard shortcuts

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