files

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 FileEtagChange

type FileEtagChange struct {
	Path string
	Etag string
}

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

type HTTPServer interface {
	ListenAndServe() error
	Shutdown(ctx context.Context) error
}

HTTPServer defines the required methods from the HTTP server

type StoredCollection added in v1.3.0

type StoredCollection struct {
	ID           string     `bson:"id" json:"id"`
	State        string     `bson:"state" json:"state"`
	LastModified time.Time  `bson:"last_modified" json:"-"`
	PublishedAt  *time.Time `bson:"published_at,omitempty" json:"-"`
}

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"`
	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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL