Files
cloud-services/pkg/common/apicalls.go

27 lines
648 B
Go

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
}