dcbot/internal/domain/tw_server.go

32 lines
582 B
Go

package domain
import "fmt"
type TWServer struct {
Key string
URL string
Open bool
}
type TWServerNotFoundError struct {
VersionCode string
Key string
}
var _ TranslatableError = TWServerNotFoundError{}
func (e TWServerNotFoundError) Error() string {
return fmt.Sprintf("server (VersionCode=%s,Key=%s) not found", e.VersionCode, e.Key)
}
func (e TWServerNotFoundError) Slug() string {
return "tw-server-not-found"
}
func (e TWServerNotFoundError) Params() map[string]any {
return map[string]any{
"VersionCode": e.VersionCode,
"Key": e.Key,
}
}