dcbot/internal/domain/tw_server.go
Dawid Wysokiński c7efe7a240
All checks were successful
continuous-integration/drone/push Build is passing
refactor: split domain/tw.go into multiple files
2023-07-09 08:06:53 +02:00

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,
}
}