refactor - pasdns can now look sane
This commit is contained in:
parent
cc8322f221
commit
0be492aa87
7 changed files with 97 additions and 31 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue