pas/Constants/constants.go

36 lines
770 B
Go
Raw Permalink Normal View History

2024-07-14 04:49:21 +02:00
package Constants
type Method string
2024-07-15 20:24:27 +02:00
type OperationSuccessClassification string
2024-07-14 04:49:21 +02:00
const (
UNKNOWN Method = "wtf bro"
GET Method = "GET"
POST Method = "POST"
)
const (
2024-07-15 20:24:27 +02:00
OK OperationSuccessClassification = "OK"
INTERNALSERVERERROR OperationSuccessClassification = "SERVERSHATITSELF"
BADREQUEST OperationSuccessClassification = "BRUH"
NOTFOUND OperationSuccessClassification = "NOTFOUND"
2024-07-14 04:49:21 +02:00
)
2024-07-15 20:24:27 +02:00
type Request struct {
Intent Intent
Body string
}
type Response struct {
OperationSuccessClassification OperationSuccessClassification
ResponseHeader map[string]string
Body string
}
2024-07-14 04:49:21 +02:00
type Intent struct {
Method Method
Path string
Version string
Headers map[string]string
}