Documentation
¶
Index ¶
Constants ¶
View Source
const ( ActionCreate = "CREATE" ActionRead = "READ" ActionUpdate = "UPDATE" ActionDelete = "DELETE" )
Action consts
Variables ¶
View Source
var AvroSchema = &avro.Schema{
Definition: `{
"type": "record",
"name": "file-published",
"fields": [
{"name": "path", "type": "string"},
{"name": "etag", "type": "string"},
{"name": "type", "type": "string"},
{"name": "sizeInBytes", "type": "string"}
]
}`,
}
Functions ¶
This section is empty.
Types ¶
type EventsList ¶ added in v1.13.0
type EventsList struct {
Count int `json:"count"`
Limit int `json:"limit"`
Offset int `json:"offset"`
TotalCount int `json:"total_count"`
Items []FileEvent `json:"items"`
}
EventsList represents a paginated list of file events
type FileEtagChange ¶
type FileEvent ¶ added in v1.13.0
type FileEvent struct {
CreatedAt *time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"`
RequestedBy *RequestedBy `json:"requested_by" bson:"requested_by"`
Action string `json:"action" bson:"action"`
Resource string `json:"resource" bson:"resource"`
File *FileMetaData `json:"file" bson:"file"`
}
FileEvent represents a file access event for the audit log
type FileMetaData ¶ added in v1.13.0
type FileMetaData struct {
Path string `json:"path" bson:"path"`
IsPublishable bool `json:"is_publishable" bson:"is_publishable"`
CollectionID *string `json:"collection_id,omitempty" bson:"collection_id,omitempty"`
BundleID *string `json:"bundle_id,omitempty" bson:"bundle_id,omitempty"`
Title string `json:"title" bson:"title"`
SizeInBytes uint64 `json:"size_in_bytes" bson:"size_in_bytes"`
Type string `json:"type" bson:"type"`
Licence string `json:"licence" bson:"licence"`
LicenceURL string `json:"licence_url" bson:"licence_url"`
State string `json:"state,omitempty" bson:"state,omitempty"`
Etag string `json:"etag,omitempty" bson:"etag,omitempty"`
}
FileMetaData represents the basic file information stored in an event
type FilePublished ¶
type FilePublished struct {
Path string `avro:"path"`
Type string `avro:"type"`
Etag string `avro:"etag"`
SizeInBytes string `avro:"sizeInBytes"`
}
FilePublished provides an avro structure for an image published event
type HTTPServer ¶
HTTPServer defines the required methods from the HTTP server
type RequestedBy ¶ added in v1.13.0
type RequestedBy struct {
ID string `json:"id" bson:"id"`
Email string `json:"email,omitempty" bson:"email,omitempty"`
}
RequestedBy represents the user who made the request
type StoredBundle ¶ added in v1.8.0
type StoredCollection ¶ added in v1.3.0
type StoredRegisteredMetaData ¶
type StoredRegisteredMetaData struct {
Path string `bson:"path" json:"path"`
IsPublishable bool `bson:"is_publishable" json:"is_publishable"`
CollectionID *string `bson:"collection_id,omitempty" json:"collection_id,omitempty"`
BundleID *string `bson:"bundle_id,omitempty" json:"bundle_id,omitempty"`
Title string `bson:"title" json:"title"`
SizeInBytes uint64 `bson:"size_in_bytes" json:"size_in_bytes"`
Type string `bson:"type" json:"type"`
Licence string `bson:"licence" json:"licence"`
LicenceURL string `bson:"licence_url" json:"licence_url"`
CreatedAt time.Time `bson:"created_at" json:"-"`
LastModified time.Time `bson:"last_modified" json:"-"`
UploadCompletedAt *time.Time `bson:"upload_completed_at,omitempty" json:"-"`
PublishedAt *time.Time `bson:"published_at,omitempty" json:"-"`
MovedAt *time.Time `bson:"moved_at,omitempty" json:"-"`
State string `bson:"state" json:"state"`
Etag string `bson:"etag" json:"etag"`
}
Click to show internal directories.
Click to hide internal directories.