usecase

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 7 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 UseCaseBase

type UseCaseBase struct {
	LocalEntity spineapi.EntityLocalInterface

	UseCaseActor model.UseCaseActorType
	UseCaseName  model.UseCaseNameType

	EventCB api.EntityEventCallback
	// contains filtered or unexported fields
}

func NewUseCaseBase

func NewUseCaseBase(
	localEntity spineapi.EntityLocalInterface,
	usecaseActor model.UseCaseActorType,
	usecaseName model.UseCaseNameType,
	useCaseVersion string,
	useCaseDocumentSubVersion string,
	useCaseScenarios []api.UseCaseScenario,
	eventCB api.EntityEventCallback,
	useCaseUpdateEvent api.EventType,
	validActorTypes []model.UseCaseActorType,
	validEntityTypes []model.EntityTypeType,
	allEntityTypesValid bool,
) *UseCaseBase

Adds a new use case to an entity

Parameters:

  • localEntity: The local entity which should support the use case
  • usecaseActor: The actor type of the use case
  • usecaseName: The name of the use case
  • useCaseVersion: The version of the use case
  • useCaseDocumentSubVersion: The sub version of the use case document
  • useCaseScenarios: The supported scenarios of the use case
  • eventCB: The callback to be called when an usecase update event of a remote entity is triggered (optional, can be nil)
  • useCaseUpdateEvent: The event type of the use case update event for the eventCB
  • validActorTypes: The valid actor types for the use case in a remote entity
  • validEntityTypes: The valid entity types for the use case in a remote entity

func (*UseCaseBase) AddUseCase

func (u *UseCaseBase) AddUseCase()

func (*UseCaseBase) AvailableScenariosForEntity

func (u *UseCaseBase) AvailableScenariosForEntity(entity spineapi.EntityRemoteInterface) []uint

return the currently available scenarios for the use case for a remote entity

func (*UseCaseBase) HandleEvent

func (u *UseCaseBase) HandleEvent(payload spineapi.EventPayload)

handle SPINE events

func (*UseCaseBase) IsCompatibleEntityType

func (u *UseCaseBase) IsCompatibleEntityType(entity spineapi.EntityRemoteInterface) bool

func (*UseCaseBase) IsScenarioAvailableAtEntity

func (u *UseCaseBase) IsScenarioAvailableAtEntity(
	entity spineapi.EntityRemoteInterface,
	scenario uint,
) bool

check if the provided scenario are available at the remote entity

func (*UseCaseBase) RemoteEntitiesScenarios

func (u *UseCaseBase) RemoteEntitiesScenarios() []api.RemoteEntityScenarios

return the current list of compatible remote entities and their scenarios

func (*UseCaseBase) RemoveUseCase

func (u *UseCaseBase) RemoveUseCase()

func (*UseCaseBase) UpdateUseCaseAvailability

func (u *UseCaseBase) UpdateUseCaseAvailability(available bool)

Jump to

Keyboard shortcuts

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