refactor - pasdns can now look sane

This commit is contained in:
amy 2024-07-15 21:54:27 +03:30
parent cc8322f221
commit 0be492aa87
7 changed files with 97 additions and 31 deletions

View file

@ -1,7 +1,7 @@
package Constants
type Method string
type Response string
type OperationSuccessClassification string
const (
UNKNOWN Method = "wtf bro"
@ -10,10 +10,23 @@ const (
)
const (
OK Response = "OK"
NOTFOUND Response = "NOTFOUND"
OK OperationSuccessClassification = "OK"
INTERNALSERVERERROR OperationSuccessClassification = "SERVERSHATITSELF"
BADREQUEST OperationSuccessClassification = "BRUH"
NOTFOUND OperationSuccessClassification = "NOTFOUND"
)
type Request struct {
Intent Intent
Body string
}
type Response struct {
OperationSuccessClassification OperationSuccessClassification
ResponseHeader map[string]string
Body string
}
type Intent struct {
Method Method
Path string