Documentation ¶
Index ¶
- func BuildExecCommand(message api.Payload, c *ServerConfig) (*exec.Cmd, error)
- func GetMimeTypeExtension(mimeType string) (string, error)
- func GetPassedArgs(args string) ([]string, error)
- func IsAllowedMimeType(mimetype string, allowedFormats []string) bool
- func MimeToPandoc(mimeType string) (string, error)
- type Command
- type QueueMiddleware
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildExecCommand ¶
func GetMimeTypeExtension ¶
func GetPassedArgs ¶
func IsAllowedMimeType ¶
func MimeToPandoc ¶
Types ¶
type Command ¶
type Command struct { // Command to execute. // // required: true Cmd string `yaml:"cmd"` // Arguments for the command. // // required: false Args []string `yaml:"args"` }
Command describes the command and arguments to execute for a specific MIME type.
swagger:model Command
type QueueMiddleware ¶
type ServerConfig ¶
type ServerConfig struct { // Label of the server configuration used for identification. // // required: true Label string `yaml:"label"` // Label of the server configuration used for identification. // // required: false QueueMiddlewares []QueueMiddleware `yaml:"queueMiddlewares,omitempty"` // HTTP method used for sending data to the destination server. // // required: false DestinationHTTPMethod string `yaml:"destinationHttpMethod"` // Header name for the file resource. // // required: false FileHeader string `yaml:"fileHeader,omitempty"` // Header name for additional arguments passed to the command. // // required: false ArgHeader string `yaml:"argHeader,omitempty"` // Indicates whether the authentication header should be forwarded. // // required: false ForwardAuth bool `yaml:"forwardAuth,omitempty"` // List of MIME types allowed for processing. // // required: false AllowedMimeTypes []string `yaml:"allowedMimeTypes"` // Commands and arguments ran by MIME type. // // required: false CmdByMimeType map[string]Command `yaml:"cmdByMimeType"` // Commands and arguments ran by MIME type based on the destination file format // // required: false MimeTypeFromDestination bool `yaml:"mimeTypeFromDestination,omitempty"` }
ServerConfig defines server-specific configurations.
swagger:model ServerConfig
func ReadConfig ¶
func ReadConfig(yp string) (*ServerConfig, error)
func (*ServerConfig) GetFileStream ¶
func (c *ServerConfig) GetFileStream(r *http.Request, message api.Payload, auth string) (io.ReadCloser, int, error)
Click to show internal directories.
Click to hide internal directories.