first-commit

This commit is contained in:
2025-08-25 15:46:12 +08:00
commit f4d95dfff4
5665 changed files with 705359 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package application_errors
import "fmt"
// ErrIllegalApplicationParameters 非法参数错误
type ErrIllegalApplicationParameters struct {
FieldList []string
Message string
}
func (err ErrIllegalApplicationParameters) Error() string {
return fmt.Sprintf("Illegal Application parameters: fields %v %s", err.FieldList, err.Message)
}
// ErrOperateApplication 操作 Application 错误
type ErrOperateApplication struct {
Action string
Message string
}
func (err ErrOperateApplication) Error() string {
return fmt.Sprintf("Failed to %s: %s", err.Action, err.Message)
}
// ErrK8sApplicationNotReady Application 未就绪错误
type ErrK8sApplicationNotReady struct {
Name string
Namespace string
Wait bool
}
func (err ErrK8sApplicationNotReady) Error() string {
return fmt.Sprintf("Application '%s' in namespace '%s' is not ready (wait=%v)",
err.Name, err.Namespace, err.Wait)
}