Documentation ¶
Index ¶
- func Base36ID(key string, input string, length int) (string, error)
- func Base36IDPerMachine(input string, length int) (string, error)
- func CalculateHash(s, salt string) string
- func ContextWithSession(ctx context.Context) context.Context
- func ContextWithSessionID(ctx context.Context, sessionID string) context.Context
- func NewExecutionID() string
- func NewPipelineExecutionID() string
- func NewProcessID() string
- func NewSessionID() string
- func NewStepExecutionID() string
- func NewUniqueID() string
- func NodeID(port string) (string, error)
- func RunSendEmail(ctx context.Context, input modconfig.Input) (*modconfig.Output, error)
- func Session(ctx context.Context) string
- func ValidateEmailInput(ctx context.Context, i modconfig.Input) error
- type SessionContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base36ID ¶
Base36ID returns a base36 hash of the input string, using the provided key. Our approach is lossy using only part of the true hash, but good enough for our purposes to prevent clashes.
func Base36IDPerMachine ¶
Base36IDPerMachine returns a base36 hash of the input string, using the machine ID as key. This means the same input will return the same hash on the same machine. Useful for unique IDs in a distributed system.
func CalculateHash ¶
func ContextWithSession ¶
ContextWithSession returns a new context with a new session ID.
func ContextWithSessionID ¶
ContextWithSessionID returns a new context with the given session ID. This is useful for testing.
func NewExecutionID ¶
func NewExecutionID() string
func NewPipelineExecutionID ¶
func NewPipelineExecutionID() string
func NewProcessID ¶
func NewProcessID() string
func NewSessionID ¶
func NewSessionID() string
func NewStepExecutionID ¶
func NewStepExecutionID() string
func NewUniqueID ¶
func NewUniqueID() string
func RunSendEmail ¶
Types ¶
type SessionContextKey ¶
type SessionContextKey struct{}
Click to show internal directories.
Click to hide internal directories.