Documentation ¶
Index ¶
- Constants
- func NewHistoryError(recordType RecordType, historyFile string) error
- type ApiHistoryItem
- type ApiSpec
- type BaseResourceSpec
- type BatchHistoryItem
- type BatchJobSpec
- type BatchSpec
- type Bucket
- type BucketSpec
- type Dashboard
- type DashboardResponse
- type HistoryEvent
- type HistoryEvents
- type HistoryItem
- type HttpProxySpec
- type KeyValueSpec
- type NotifierSpec
- type Param
- type PolicyResource
- type PolicySpec
- type QueueSpec
- type RecordType
- type RequestHistory
- type ResponseHistory
- type SQLDatabaseSpec
- type ScheduleHistoryItem
- type ScheduleSpec
- type SecretSpec
- type ServiceSpec
- type SubscriberSpec
- type TopicHistoryItem
- type TopicSpec
- type WebsocketSpec
Constants ¶
View Source
const AddRecordTopic = "history:addrecord"
Variables ¶
This section is empty.
Functions ¶
func NewHistoryError ¶ added in v1.20.0
func NewHistoryError(recordType RecordType, historyFile string) error
Types ¶
type ApiHistoryItem ¶ added in v1.19.0
type ApiHistoryItem struct { Api string `json:"api"` Request *RequestHistory `json:"request"` Response *ResponseHistory `json:"response"` }
type ApiSpec ¶ added in v1.34.0
type ApiSpec struct { *BaseResourceSpec OpenApiSpec *openapi3.T `json:"spec"` }
type BaseResourceSpec ¶ added in v1.34.0
type BatchHistoryItem ¶ added in v1.54.0
type BatchJobSpec ¶ added in v1.54.0
type BatchJobSpec struct { *BaseResourceSpec Target string `json:"target"` }
type BatchSpec ¶ added in v1.54.0
type BatchSpec struct { *BaseResourceSpec FilePath string `json:"filePath"` }
type BucketSpec ¶ added in v1.34.0
type BucketSpec struct {
*BaseResourceSpec
}
type Dashboard ¶ added in v1.18.0
type Dashboard struct {
// contains filtered or unexported fields
}
func (*Dashboard) DeleteHistoryRecord ¶ added in v1.34.0
func (d *Dashboard) DeleteHistoryRecord(recordType RecordType) error
func (*Dashboard) GetDashboardUrl ¶ added in v1.34.0
func (*Dashboard) ReadAllHistoryRecords ¶ added in v1.34.0
func (d *Dashboard) ReadAllHistoryRecords() (*HistoryEvents, error)
type DashboardResponse ¶ added in v1.19.0
type DashboardResponse struct { Apis []ApiSpec `json:"apis"` ApisUseHttps bool `json:"apisUseHttps"` Batches []*BatchSpec `json:"batchServices"` BatchJobs []*BatchJobSpec `json:"jobs"` Buckets []*BucketSpec `json:"buckets"` Schedules []ScheduleSpec `json:"schedules"` Topics []*TopicSpec `json:"topics"` Websockets []WebsocketSpec `json:"websockets"` Subscriptions []*SubscriberSpec `json:"subscriptions"` Notifications []*NotifierSpec `json:"notifications"` Stores []*KeyValueSpec `json:"stores"` SQLDatabases []*SQLDatabaseSpec `json:"sqlDatabases"` Secrets []*SecretSpec `json:"secrets"` Queues []*QueueSpec `json:"queues"` HttpProxies []*HttpProxySpec `json:"httpProxies"` Services []*ServiceSpec `json:"services"` Policies map[string]PolicySpec `json:"policies"` ProjectName string `json:"projectName"` ApiAddresses map[string]string `json:"apiAddresses"` WebsocketAddresses map[string]string `json:"websocketAddresses"` HttpWorkerAddresses map[string]string `json:"httpWorkerAddresses"` TriggerAddress string `json:"triggerAddress"` StorageAddress string `json:"storageAddress"` CurrentVersion string `json:"currentVersion"` LatestVersion string `json:"latestVersion"` Connected bool `json:"connected"` }
type HistoryEvent ¶ added in v1.34.0
type HistoryEvent[Event HistoryItem] struct { Time int64 `json:"time,omitempty"` Event Event `json:"event"` RecordType RecordType `json:"-"` }
func ReadHistoryRecords ¶ added in v1.19.0
func ReadHistoryRecords[T HistoryItem](projectDir string, recordType RecordType) ([]*HistoryEvent[T], error)
type HistoryEvents ¶ added in v1.34.0
type HistoryEvents struct { ScheduleHistory []*HistoryEvent[ScheduleHistoryItem] `json:"schedules"` TopicHistory []*HistoryEvent[TopicHistoryItem] `json:"topics"` ApiHistory []*HistoryEvent[ApiHistoryItem] `json:"apis"` BatchHistory []*HistoryEvent[BatchHistoryItem] `json:"jobs"` }
type HistoryItem ¶ added in v1.34.0
type HistoryItem interface { ApiHistoryItem | TopicHistoryItem | ScheduleHistoryItem | any }
type HttpProxySpec ¶ added in v1.34.0
type HttpProxySpec struct { *BaseResourceSpec Target string `json:"target"` }
type KeyValueSpec ¶ added in v1.34.0
type KeyValueSpec struct {
*BaseResourceSpec
}
type NotifierSpec ¶ added in v1.34.0
type PolicyResource ¶ added in v1.34.0
type PolicySpec ¶ added in v1.34.0
type PolicySpec struct { *BaseResourceSpec Principals []PolicyResource `json:"principals"` Actions []string `json:"actions"` Resources []PolicyResource `json:"resources"` }
type QueueSpec ¶ added in v1.34.0
type QueueSpec struct {
*BaseResourceSpec
}
type RecordType ¶ added in v1.19.0
type RecordType string
const ( API RecordType = "apis" TOPIC RecordType = "topics" SCHEDULE RecordType = "schedules" BATCHJOBS RecordType = "jobs" )
type RequestHistory ¶ added in v1.19.0
type RequestHistory struct { Method string `json:"method"` Path string `json:"path"` QueryParams []Param `json:"queryParams"` PathParams []Param `json:"pathParams"` Body []byte `json:"body"` Headers map[string][]string `json:"headers"` }
Only log what is required from req/resp to avoid massive log files
type ResponseHistory ¶ added in v1.19.0
type SQLDatabaseSpec ¶ added in v1.42.0
type SQLDatabaseSpec struct { *BaseResourceSpec ConnectionString string `json:"connectionString"` Status string `json:"status"` MigrationsPath string `json:"migrationsPath"` }
type ScheduleHistoryItem ¶ added in v1.34.0
type ScheduleSpec ¶ added in v1.34.0
type ScheduleSpec struct { *BaseResourceSpec Expression string `json:"expression,omitempty"` Rate string `json:"rate,omitempty"` Target string `json:"target,omitempty"` }
type SecretSpec ¶ added in v1.50.0
type SecretSpec struct {
*BaseResourceSpec
}
type ServiceSpec ¶ added in v1.34.0
type ServiceSpec struct { *BaseResourceSpec FilePath string `json:"filePath"` }
type SubscriberSpec ¶ added in v1.34.0
type TopicHistoryItem ¶ added in v1.34.0
type TopicSpec ¶ added in v1.34.0
type TopicSpec struct {
*BaseResourceSpec
}
type WebsocketSpec ¶ added in v1.34.0
type WebsocketSpec struct { *BaseResourceSpec Targets map[string]string `json:"targets,omitempty"` }
Click to show internal directories.
Click to hide internal directories.