rest

package
v2.0.0-...-66710c2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const BASEPATH = "/api/v1"

Variables

This section is empty.

Functions

func NewController

func NewController(addr, extAddr string,
	tlsConfig *tls.Config,
	bearer map[string]string,
	dbClients map[string]mediaserverproto.DatabaseClient,
	actionControllerClients map[string]mediaserverproto.ActionClient,
	deleterControllerClients map[string]mediaserverproto.DeleterClient,
	actionDispatcherClients map[string]mediaserverproto.ActionDispatcherClient,
	logger zLogger.ZLogger,
) (*controller, error)

func NewResultMessage

func NewResultMessage(ctx *gin.Context, status int, err error)

Types

type CreateItemMessage

type CreateItemMessage struct {
	// Signature is a unique identifier for the item within its collection.
	Signature string `json:"signature" example:"10_3931_e-rara-20425_20230519T104744_gen6_ver1.zip_10_3931_e-rara-20425_export_mets.xml"`

	// Urn represents the path of the item. It is used to locate the item within the system.
	Urn string `` /* 181-byte string literal not displayed */

	// Public is an optional field that can be used to store any public data associated with the item.
	Public bool `json:"public,omitempty" example:"true"`

	// Parent is an optional field that represents the signature of the parent item, if any.
	// This is used to establish a parent-child relationship between items.
	Parent string `` /* 126-byte string literal not displayed */

	// PublicActions is an optional field that can be used to store any public actions associated with the item.
	PublicActions string `json:"public_actions,omitempty"`

	// The type of ingest
	// * keep: ingest without copy of data
	// * copy: ingest with copy of data
	// * move: ingest with copy of data and deletion after copy
	// default: keep
	IngestType string `json:"ingest_type,omitempty" example:"copy" enums:"keep,copy,move"`
}

CreateItemMessage represents the structure of the data required to create a new item. This structure is used when the client sends a request to create a new item in the collection.

type GetDerivateIngestItemMessage

type GetDerivateIngestItemMessage struct {
	Type     string   `json:"type" example:"video"`
	Subtype  string   `json:"subtype" example:"mp4"`
	Suffixes []string `json:"suffixes" example:"$$web"`
}

type HTTPCollectionResultMessage

type HTTPCollectionResultMessage struct {
	Name            string                    `json:"identifier,omitempty"`
	Description     string                    `json:"description,omitempty"`
	SignaturePrefix string                    `json:"signature_prefix,omitempty"`
	Secret          string                    `json:"secret,omitempty"`
	Public          string                    `json:"public,omitempty"`
	Jwtkey          string                    `json:"jwtkey,omitempty"`
	Storage         *HTTPStorageResultMessage `json:"storage,omitempty"`
}

type HTTPDerivateIngestItemMessage

type HTTPDerivateIngestItemMessage struct {
	Collection      string                          `json:"collection"`
	Signature       string                          `json:"signature"`
	CacheMetadata   *mediaserverproto.CacheMetadata `json:"cacheMetadata"`
	MissingSuffixes []string                        `json:"missingSuffixes"`
}

type HTTPIngestItemMessage

type HTTPIngestItemMessage struct {
	Collection string `json:"collection"`
	Signature  string `json:"signature"`
	Urn        string `json:"path"`
}

type HTTPResultMessage

type HTTPResultMessage struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"status bad request"`
}

type HTTPStorageResultMessage

type HTTPStorageResultMessage struct {
	Name       string `json:"name,omitempty"`
	Filebase   string `json:"filebase,omitempty"`
	Datadir    string `json:"datadir,omitempty"`
	Subitemdir string `json:"subitemdir,omitempty"`
	Tempdir    string `json:"tempdir,omitempty"`
}

Directories

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.

Jump to

Keyboard shortcuts

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