Documentation ¶
Index ¶
- func ValidatePassword(password string) error
- type AdminAddUserRequest
- type AdminUpdateUserRequest
- type Api
- func (a *Api) AuthorizeAdminV2() echo.MiddlewareFunc
- func (a *Api) ConfirmAuthentication(c echo.Context) error
- func (a *Api) ConfirmAuthorizedToken() echo.MiddlewareFunc
- func (a *Api) CreateResetPasswordToken(c echo.Context) error
- func (a *Api) GetUsers(c echo.Context) error
- func (a *Api) LoginV2(c echo.Context) error
- func (a *Api) Logout(c echo.Context) error
- func (a *Api) ResetPassword(c echo.Context) error
- func (a *Api) Serve() error
- type AuthConfirmationRequest
- type BulkEditDocumentsRequest
- type Context
- type DocumentExistsResponse
- type DocumentFilter
- type DocumentProcessStep
- type DocumentUpdateRequest
- type ForceDocumentProcessingRequest
- type ForgottenPasswordRequest
- type LoginRequest
- type LoginResponse
- type MetadataKeyRequest
- type MetadataRequest
- type MetadataUpdateRequest
- type MetadataValueRequest
- type MimeTypesSupportedResponse
- type PrettyTime
- type ReorderRulesRequest
- type ReqUserPreferences
- type ResetPasswordRequest
- type Rule
- type RuleAction
- type RuleCondition
- type RuleTest
- type SearchSuggestRequest
- type SearchSuggestResponse
- type SortKey
- type SortKeys
- type UserContext
- type UserPreferences
- type VersionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePassword ¶
Types ¶
type AdminAddUserRequest ¶
type AdminUpdateUserRequest ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func (*Api) AuthorizeAdminV2 ¶
func (a *Api) AuthorizeAdminV2() echo.MiddlewareFunc
func (*Api) ConfirmAuthentication ¶
func (*Api) ConfirmAuthorizedToken ¶
func (a *Api) ConfirmAuthorizedToken() echo.MiddlewareFunc
func (*Api) CreateResetPasswordToken ¶
func (*Api) ResetPassword ¶
type AuthConfirmationRequest ¶
type AuthConfirmationRequest struct {
Password string `json:"password" valid:"stringlength(8|150)"`
}
type BulkEditDocumentsRequest ¶
type BulkEditDocumentsRequest struct { Documents []string `json:"documents" valid:"required"` AddMetadata MetadataUpdateRequest `json:"add_metadata" valid:"-"` RemoveMetadata MetadataUpdateRequest `json:"remove_metadata" valid:"-"` Lang string `json:"lang" valid:"language, optional"` Date int64 `json:"date" valid:"optional,range(0|4106139691000)"` // year 2200 in ms }
type DocumentExistsResponse ¶
type DocumentFilter ¶
type DocumentProcessStep ¶
type DocumentUpdateRequest ¶
type DocumentUpdateRequest struct { Name string `json:"name" valid:"required,stringlength(1|200)"` Description string `json:"description" valid:"maxstringlength(1000),optional"` Filename string `json:"filename" valid:"optional"` Date int64 `json:"date" valid:"optional,range(0|4106139691000)"` // year 2200 in ms Metadata []MetadataRequest `json:"metadata" valid:"-"` Lang string `json:"lang" valid:"language, optional"` Favorite bool `json:"favorite" valid:"-"` }
DocumentUpdateRequest swagger:model DocumentUpdateRequestBody
type ForceDocumentProcessingRequest ¶
type ForceDocumentProcessingRequest struct { UserId int `json:"user_id" valid:"-"` DocumentId string `json:"document_id" valid:"-"` FromStep string `json:"from_step" valid:"process_step~invalid process step"` }
ForceDocumentsProcessingRequest describes request to force processing of documents. swagger:model ForceDocumumentsProcessing
type ForgottenPasswordRequest ¶
type ForgottenPasswordRequest struct {
Email string `json:"email" valid:"email"`
}
type LoginRequest ¶
type LoginResponse ¶
type MetadataKeyRequest ¶
type MetadataRequest ¶
type MetadataRequest struct { KeyId int `valid:"required" json:"key_id"` ValueId int `valid:"required" json:"value_id"` }
func (MetadataRequest) ToMetadata ¶ added in v0.6.0
func (m MetadataRequest) ToMetadata() models.Metadata
type MetadataUpdateRequest ¶
type MetadataUpdateRequest struct {
Metadata []MetadataRequest `valid:"required" json:"metadata"`
}
func (*MetadataUpdateRequest) Keys ¶
func (m *MetadataUpdateRequest) Keys() []int
func (*MetadataUpdateRequest) ToAggregate ¶ added in v0.6.0
func (m *MetadataUpdateRequest) ToAggregate() []aggregates.Metadata
func (*MetadataUpdateRequest) ToMetadataArray ¶ added in v0.6.0
func (m *MetadataUpdateRequest) ToMetadataArray() []models.Metadata
func (*MetadataUpdateRequest) UniqueKeys ¶
func (m *MetadataUpdateRequest) UniqueKeys() []int
type MetadataValueRequest ¶
type MetadataValueRequest struct { // Value of new metadata Value string `json:"value" valid:"required,metadata,stringlength(1|30)"` // Optional comment Comment string `json:"comment" valid:"maxstringlength(1000),optional"` // MatchDocuments instructs to try to match documents for this value. MatchDocuments bool `json:"match_documents" valid:"-"` // validate MatchType when creating, allowing default to be empty string MatchType string `json:"match_type" valid:"in(regex|exact),optional"` MatchFilter string `json:"match_filter" valid:"maxstringlength(100),optional"` }
type MimeTypesSupportedResponse ¶
type MimeTypesSupportedResponse struct { Names []string `json:"names"` Mimetypes []string `json:"mimetypes"` }
MimeTypesSupportedResponse conatains info on mime types that server can extract.
type PrettyTime ¶
PrettyTime prints time as default time string when marshaled as json
func (PrettyTime) MarshalJSON ¶
func (p PrettyTime) MarshalJSON() ([]byte, error)
type ReorderRulesRequest ¶
type ReorderRulesRequest struct {
Ids []int `json:"ids" valid:"-"`
}
type ReqUserPreferences ¶
type ReqUserPreferences struct {
Email string `json:"email" valid:"email,optional"`
}
swagger:model UserPreferences
type ResetPasswordRequest ¶
type Rule ¶
type Rule struct { Id int `json:"id" valid:"-"` Name string `json:"name" valid:"-"` Description string `json:"description" valid:"-"` Enabled bool `json:"enabled" valid:"-"` Order int `json:"order" valid:"-"` Mode string `json:"mode" valid:"-"` CreatedAt int64 `json:"created_at" valid:"-"` UpdatedAt int64 `json:"updated_at" valid:"-"` Triggers models.RuleTriggerArray `json:"triggers" valid:"rule_trigger_type"` Conditions []RuleCondition `json:"conditions" valid:"-"` Actions []RuleAction `json:"actions" valid:"-"` }
type RuleAction ¶
type RuleAction struct { Id int `json:"id" valid:"-"` RuleId int `json:"rule_id" valid:"-"` Enabled bool `json:"enabled" valid:"-"` OnCondition bool `json:"on_condition" valid:"-"` Action string `json:"action" valid:"-"` Value string `json:"value" valid:"-"` Metadata models.Metadata `json:"metadata" valid:"-"` }
func (*RuleAction) ToAction ¶
func (r *RuleAction) ToAction() *models.RuleAction
type RuleCondition ¶
type RuleCondition struct { Id int `json:"id" valid:"-"` RuleId int `json:"rule_id" valid:"-"` Enabled bool `json:"enabled" valid:"-"` CaseInsensitive bool `json:"case_insensitive" valid:"-"` Inverted bool `json:"inverted_match" valid:"-"` ConditionType string `json:"condition_type" valid:"-"` IsRegex bool `json:"is_regex" valid:"-"` Value string `json:"value" valid:"-"` DateFmt string `json:"date_fmt" valid:"-"` Metadata models.Metadata `json:"metadata" valid:"-"` }
func (*RuleCondition) ToCondition ¶
func (r *RuleCondition) ToCondition() *models.RuleCondition
type SearchSuggestRequest ¶
type SearchSuggestRequest struct {
Filter string `json:"filter" valid:"-"`
}
type SearchSuggestResponse ¶
type UserContext ¶
type UserPreferences ¶
type UserPreferences struct { // user Id int `json:"user_id"` Name string `json:"user_name"` Email string `json:"email"` UpdatedAt int64 `json:"updated_at"` CreatedAt int64 `json:"created_at"` DocumentsCount int64 `json:"documents_count"` DocumentsSize int64 `json:"documents_size"` DocumentsSizeString string `json:"documents_size_string"` IsAdmin bool `json:"is_admin"` }
swagger:model UserPreferences
type VersionResponse ¶
type VersionResponse struct { Name string `json:"name"` Version string `json:"version"` Commit string `json:"commit"` }
VersionResponse contains general server info.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package Virtualpaper API documentation.
|
Package Virtualpaper API documentation. |
Click to show internal directories.
Click to hide internal directories.