types

package
v0.0.0-...-e28bd7b Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

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()

func (*Config) Override

func (c *Config) Override()

Override ...

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

func (DependencyResult) Type

func (result DependencyResult) Type() DependentType

Type ...

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

type Session

type Session struct {
	Actor    string
	Emulator string
	TID      common.TransactionID
}

Session is user who perform a certain actions.

func (Session) ToServiceActor

func (s Session) ToServiceActor() service.Actor

ToServiceActor converts to service.Actor

Jump to

Keyboard shortcuts

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