Documentation ¶
Index ¶
- Constants
- func GetFileAsJson(uf string) (interface{}, error)
- func GetZeroLogger(w io.Writer) zerolog.Logger
- func ReportError(w http.ResponseWriter, errcode string, err error)
- func ReportResult(w http.ResponseWriter, data interface{})
- func StartServer(f func(w http.ResponseWriter, r *http.Request, ri *RequestInfo), ...)
- func ToJSON(str string) interface{}
- func Unmarshal(obj interface{}, strict bool, r *http.Request) error
- type ActionError
- type DirektivLogger
- type DirektivLoggerWriter
- type File
- func (f *File) AsBase64(ri *RequestInfo) (string, error)
- func (f *File) AsFile(ri *RequestInfo, mode os.FileMode) (*os.File, error)
- func (f *File) AsReader(ri *RequestInfo) (io.ReadCloser, error)
- func (f *File) AsString(ri *RequestInfo) (string, error)
- func (f *File) Size(ri *RequestInfo) (int, error)
- type FileIterator
- type RequestInfo
- func (ri *RequestInfo) ActionID() string
- func (ri *RequestInfo) Dir() string
- func (ri *RequestInfo) LogWriter() *DirektivLoggerWriter
- func (ri *RequestInfo) Logger() *DirektivLogger
- func (ri *RequestInfo) ReadVar(scope, name string) (io.ReadCloser, int64, error)
- func (ri *RequestInfo) WriteVar(scope, name string, variable UploadVariable) error
- type UploadVariable
Constants ¶
View Source
const ( DirektivActionIDHeader = "Direktiv-ActionID" DirektivErrorCodeHeader = "Direktiv-ErrorCode" DirektivErrorMessageHeader = "Direktiv-ErrorMessage" DirektivTmpDir = "Direktiv-TempDir" )
View Source
const ( ScopeNamespace = "namespace" ScopeWorkflow = "workflow" ScopeInstance = "instance" ScopeThread = "thread" )
View Source
const ( TypeBase64 = "base64" TypePlain = "plain" TypeFile = "file" TypeVariable = "var" TypeReader = "reader" )
View Source
const ( UnmarshallError = "io.direktiv.unmarshal" MarshallError = "io.direktiv.marshal" )
Variables ¶
This section is empty.
Functions ¶
func GetFileAsJson ¶
func ReportError ¶
func ReportError(w http.ResponseWriter, errcode string, err error)
func ReportResult ¶
func ReportResult(w http.ResponseWriter, data interface{})
func StartServer ¶
func StartServer(f func(w http.ResponseWriter, r *http.Request, ri *RequestInfo), shutDown func())
Start Server
Types ¶
type ActionError ¶
type DirektivLogger ¶
type DirektivLogger struct {
// contains filtered or unexported fields
}
func (*DirektivLogger) Debugf ¶
func (dl *DirektivLogger) Debugf(format string, args ...interface{})
func (*DirektivLogger) Errorf ¶
func (dl *DirektivLogger) Errorf(format string, args ...interface{})
func (*DirektivLogger) Infof ¶
func (dl *DirektivLogger) Infof(format string, args ...interface{})
type DirektivLoggerWriter ¶
type DirektivLoggerWriter struct {
// contains filtered or unexported fields
}
type File ¶
type File struct { Name string `json:"name"` Data string `json:"data"` Type string `json:"type"` ContentType string `json:"contenttype"` Mode string `json:"mode"` // contains filtered or unexported fields }
func (*File) AsReader ¶
func (f *File) AsReader(ri *RequestInfo) (io.ReadCloser, error)
type FileIterator ¶
type FileIterator struct {
// contains filtered or unexported fields
}
func NewFileIterator ¶
func NewFileIterator(files []File, ri *RequestInfo) *FileIterator
func (*FileIterator) Next ¶
func (fi *FileIterator) Next() (*File, error)
func (*FileIterator) Reset ¶
func (fi *FileIterator) Reset()
type RequestInfo ¶
type RequestInfo struct {
// contains filtered or unexported fields
}
func (*RequestInfo) ActionID ¶
func (ri *RequestInfo) ActionID() string
func (*RequestInfo) Dir ¶
func (ri *RequestInfo) Dir() string
func (*RequestInfo) LogWriter ¶
func (ri *RequestInfo) LogWriter() *DirektivLoggerWriter
func (*RequestInfo) Logger ¶
func (ri *RequestInfo) Logger() *DirektivLogger
func (*RequestInfo) ReadVar ¶
func (ri *RequestInfo) ReadVar(scope, name string) (io.ReadCloser, int64, error)
func (*RequestInfo) WriteVar ¶
func (ri *RequestInfo) WriteVar(scope, name string, variable UploadVariable) error
Click to show internal directories.
Click to hide internal directories.