Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LogLevel string `envconfig:"LOG_LEVEL" default:"debug"` MsgConfig messaging2.NatsStanMsgConfig }
Config is config for the service, this can be imported from env var using envconfig.Process()
type DeletionEventHandler ¶
type DeletionEventHandler func(request DeletionRequest, tid common.TransactionID) DeletionResponse
DeletionEventHandler ...
type DeletionRequest ¶
type DeletionRequest = service.DepCheckDeletionRequest
DeletionRequest is event body for deletion request with dependent checking. Note: the type of object to be deleted is not specified by fields in this struct, but by the event type.
type DeletionResponse ¶
type DeletionResponse = service.DepCheckDeletionResponse
DeletionResponse is event body for response to deletion request with dependent checking. Note: the type of object to be deleted is not specified by fields in this struct, but by the event type.
type DependencyResult ¶
type DependencyResult struct { Depended bool // a list of identifier for the dependents, use interface to take account of different type of identifiers Dependents []interface{} // whether error occurred during the check Err error // contains filtered or unexported fields }
DependencyResult is result of checking dependencies of a type of objects (DependentType) on another object.
func Depended ¶
func Depended(dependentType DependentType) DependencyResult
Depended construct a result that indicates there is/are dependent(s) of given type. In other words, there is at least 1 object of given type depends on the object being checked. Note: this does not specify the dependent object(s).
func DependentsList ¶
func DependentsList(dependentType DependentType, list []interface{}) DependencyResult
DependentsList construct a result that indicates there is/are dependent(s) of given type, and also specified the list of dependents.
func ErrWhenCheckingDependency ¶
func ErrWhenCheckingDependency(dependentType DependentType, err error) DependencyResult
ErrWhenCheckingDependency construct a result with an error
func NoneDepended ¶
func NoneDepended(dependentType DependentType) DependencyResult
NoneDepended construct a result that indicates there is no dependents of given type. In other words, no object of given type depends on the object being checked.
func (DependencyResult) Errored ¶
func (result DependencyResult) Errored() bool
Errored return true if there is error
type DependentType ¶
type DependentType int
DependentType is type of dependent
const ( DeploymentDependent DependentType TemplateDependent ProviderDependent WorkspaceDependent CredentialDependent )
constants for dependent types
func (DependentType) String ¶
func (t DependentType) String() string
String returns the string representation