Documentation ¶
Index ¶
- func GetEnvMustExist(key string) string
- type ACLs
- type Client
- type Contributors
- type Document
- type DocumentDeleteStatus
- type DocumentList
- type DocumentService
- func (d *DocumentService) Add(doc *Document) (*Document, error)
- func (d *DocumentService) Delete(id string) (*DocumentDeleteStatus, error)
- func (d *DocumentService) Get(id string) (*Document, error)
- func (d *DocumentService) GetAll() ([]*Document, error)
- func (d *DocumentService) GetByTagId(tagid string) ([]*Document, error)
- func (d *DocumentService) GetByTitle(title string) (*Document, error)
- type File
- type FileAddStatus
- type FileList
- type FileService
- func (f *FileService) Add(documentId, previousFileId string, file *os.File) (*FileAddStatus, error)
- func (f *FileService) AddReader(documentId, previousFileId, fileName, contentType string, reader io.Reader) (*FileAddStatus, error)
- func (f *FileService) Get(documentId string) ([]*File, error)
- func (f *FileService) GetAll() ([]*File, error)
- func (f *FileService) GetData(id string) ([]byte, error)
- func (f *FileService) GetZippedFiles(id string) ([]byte, error)
- type FormValues
- type InheritedACLs
- type MultiError
- type Relations
- type RouteStep
- type Tag
- type TagDeleteStatus
- type TagList
- type TagService
- func (t *TagService) Add(tag *Tag) (*Tag, error)
- func (t *TagService) Delete(id string) (*TagDeleteStatus, error)
- func (t *TagService) Get(id string) (*Tag, error)
- func (t *TagService) GetAll() ([]*Tag, error)
- func (t *TagService) GetByName(name string) (*Tag, error)
- func (t *TagService) Update(id string, tag *Tag) (*Tag, error)
- type TeedyAPIError
- type Timestamp
- type ZippedFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvMustExist ¶
Types ¶
type Client ¶
type Client struct { Tag *TagService Document *DocumentService File *FileService // contains filtered or unexported fields }
func NewFakeClient ¶
func NewFakeClient() *Client
type Contributors ¶
type Document ¶
type Document struct { Id string `json:"id,omitempty"` Highlight string `json:"highlight,omitempty"` FileID string `json:"file_id,omitempty"` Title string `json:"title"` Description string `json:"description,omitempty"` CreateDate *Timestamp `json:"create_date,omitempty"` UpdateDate *Timestamp `json:"update_date,omitempty"` Language string `json:"language"` ActiveRoute bool `json:"active_route,omitempty"` CurrentStepName bool `json:"current_step_name,omitempty"` FileCount int `json:"file_count,omitempty"` Tags []*Tag `json:"tags,omitempty"` Subject string `json:"subject,omitempty"` Identifier string `json:"identifier,omitempty"` Publisher string `json:"publisher,omitempty"` Format string `json:"format,omitempty"` Source string `json:"source,omitempty"` Type string `json:"type,omitempty"` Coverage string `json:"coverage,omitempty"` Rights string `json:"rights,omitempty"` Creator string `json:"creator,omitempty"` Writeable bool `json:"writeable,omitempty"` ACLs []*ACLs `json:"acls,omitempty"` InheritedACLs []*InheritedACLs `json:"inherited_acls,omitempty"` Contributors []*Contributors `json:"contributors,omitempty"` Relations []*Relations `json:"relations,omitempty"` RouteStep *RouteStep `json:"route_step,omitempty"` }
func NewDocument ¶
func (*Document) UpdateTagIDsByName ¶
UpdateTagIDsByName updates the documents tag ID's if the incoming tag matches its name. This is useful when importing backups of documents
type DocumentDeleteStatus ¶
type DocumentDeleteStatus struct {
Status string `json:"Status"`
}
type DocumentList ¶
type DocumentService ¶
type DocumentService struct {
// contains filtered or unexported fields
}
func NewDocumentService ¶
func NewDocumentService(client *resty.Client, api string) *DocumentService
func (*DocumentService) Delete ¶
func (d *DocumentService) Delete(id string) (*DocumentDeleteStatus, error)
func (*DocumentService) GetAll ¶
func (d *DocumentService) GetAll() ([]*Document, error)
func (*DocumentService) GetByTagId ¶ added in v0.1.2
func (d *DocumentService) GetByTagId(tagid string) ([]*Document, error)
func (*DocumentService) GetByTitle ¶
func (d *DocumentService) GetByTitle(title string) (*Document, error)
type FileAddStatus ¶
type FileService ¶
type FileService struct {
// contains filtered or unexported fields
}
func NewFileService ¶
func NewFileService(client *resty.Client, api string) *FileService
func (*FileService) Add ¶
func (f *FileService) Add(documentId, previousFileId string, file *os.File) (*FileAddStatus, error)
func (*FileService) AddReader ¶
func (f *FileService) AddReader(documentId, previousFileId, fileName, contentType string, reader io.Reader) (*FileAddStatus, error)
func (*FileService) GetAll ¶
func (f *FileService) GetAll() ([]*File, error)
func (*FileService) GetZippedFiles ¶
func (f *FileService) GetZippedFiles(id string) ([]byte, error)
type FormValues ¶
type FormValues struct {
// contains filtered or unexported fields
}
func NewFormValues ¶
func NewFormValues() *FormValues
func (*FormValues) AddIfNotEmpty ¶
func (f *FormValues) AddIfNotEmpty(key, value string)
func (*FormValues) AddMandatory ¶
func (f *FormValues) AddMandatory(key, value string)
type InheritedACLs ¶
type MultiError ¶
MultiError stores multiple errors.
func (MultiError) Error ¶
func (e MultiError) Error() string
type Tag ¶
type TagDeleteStatus ¶
type TagDeleteStatus struct {
Status string `json:"status"`
}
type TagService ¶
type TagService struct {
// contains filtered or unexported fields
}
func NewTagService ¶
func NewTagService(client *resty.Client, api string) *TagService
func (*TagService) Delete ¶
func (t *TagService) Delete(id string) (*TagDeleteStatus, error)
func (*TagService) GetAll ¶
func (t *TagService) GetAll() ([]*Tag, error)
type TeedyAPIError ¶
func NewTeedyAPIError ¶
func NewTeedyAPIError(api string) *TeedyAPIError
func (*TeedyAPIError) Custom ¶
func (n *TeedyAPIError) Custom(description string) error
type Timestamp ¶
Timestamp defines a timestamp encoded as epoch seconds in JSON
func (Timestamp) MarshalJSON ¶
MarshalJSON is used to convert the timestamp to JSON
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON is used to convert the timestamp from JSON
type ZippedFile ¶
Click to show internal directories.
Click to hide internal directories.