errors

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Domain of errors, in the scope of the service.
	Domain = "github.com/ctfer-io/chall-manager"

	ReasonChallengeAlreadyExists = "CHALLENGE_ALREADY_EXISTS"
	ReasonChallengeNotFound      = "CHALLENGE_NOT_FOUND"
	ReasonChallengeExpired       = "CHALLENGE_EXPIRED"
	ReasonChallengeNoRenewal     = "CHALLENGE_NO_RENEWAL"
	ReasonChallengePoolerOOB     = "CHALLENGE_POOLER_OUT_OF_BOUNDS"
	ReasonChallengeInvalidUM     = "CHALLENGE_INVALID_UPDATE_MASK"

	ReasonInstanceAlreadyExists = "INSTANCE_ALREADY_EXISTS"
	ReasonInstanceNotFound      = "INSTANCE_NOT_FOUND"
	ReasonInstanceExpired       = "INSTANCE_EXPIRED"

	ReasonOCIMalformedRef         = "OCI_REFERENCE_MALFORMED"
	ReasonOCIInteraction          = "OCI_INTERACTION"
	ReasonOCINotFound             = "OCI_REFERENCE_NOT_FOUND"
	ReasonScenarioNonMatchingSpec = "SCENARIO_NON_MATCHING_SPECIFICATION"
	ReasonScenarioNotFound        = "SCENARIO_NOT_FOUND"
	ReasonScenarioPreprocess      = "SCENARIO_PREPROCESSING"
)

Variables

View Source
var (
	ErrInternalNoSub error
	ErrCanceled      error = status.New(codes.Canceled, "").Err()
)

Functions

func StatusFromError added in v0.6.5

func StatusFromError(err error) error

StatusFromError normalizes internal errors into gRPC status errors so the gateway can forward meaningful codes/messages to HTTP clients.

Types

type ChallengeExist added in v0.6.5

type ChallengeExist struct {
	ID    string
	Exist bool
}

func (*ChallengeExist) Error added in v0.6.5

func (err *ChallengeExist) Error() string

type InstanceExist added in v0.6.5

type InstanceExist struct {
	ChallengeID string
	SourceID    string
	Exist       bool
}

func (InstanceExist) Error added in v0.6.5

func (err InstanceExist) Error() string

type MalformedOCIReference added in v0.6.5

type MalformedOCIReference struct {
	Ref string
	Sub error
}

func (MalformedOCIReference) Error added in v0.6.5

func (err MalformedOCIReference) Error() string

type OCIInteraction added in v0.6.5

type OCIInteraction struct {
	Ref string
	Sub error
}

func (OCIInteraction) Error added in v0.6.5

func (err OCIInteraction) Error() string

type Preprocess added in v0.6.5

type Preprocess struct {
	Dir, Ref string
	Sub      error
}

func (Preprocess) Error added in v0.6.5

func (err Preprocess) Error() string

type Scenario added in v0.6.5

type Scenario struct {
	Ref string
	Sub error

	// FieldViolation is an optional error detail for API layers to provide clearer messages to downstream consumers
	FieldViolation *errdetails.BadRequest_FieldViolation
}

func (Scenario) Error added in v0.6.5

func (err Scenario) Error() string

Jump to

Keyboard shortcuts

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