Initial cloud-services repo - gateway service + pkg modules

This commit is contained in:
Chris Rai
2026-01-30 23:14:52 -05:00
commit fbb820d7b3
1037 changed files with 171318 additions and 0 deletions

26
pkg/common/apicalls.go Normal file
View File

@@ -0,0 +1,26 @@
package common
import "time"
type AccessType string
const AccessTypeJWT = "jwt"
const AccessTypeAPIToken = "api_token"
type APICall struct {
// ClientID can be email or api_token.
ClientID string `json:"client_id" pg:"client_id"`
// Check allowed access types above.
AccessType string `json:"access_type" pg:"access_type"`
Method string `json:"method" pg:"method"`
Endpoint string `json:"endpoint" pg:"endpoint"`
CreatedAt *time.Time `json:"created_at" pg:"default:now()"`
}
// APICallsSearch is supposed to be used for calls only.
type APICallsSearch struct {
Search string
From *time.Time
To *time.Time
}