Documentation
¶
Index ¶
- func AdminIndexHandler(c echo.Context) error
- func AdminUserGetHandler(e echo.Context) error
- func AdminUserListHandler(e echo.Context) error
- func AdminUserUpdateHandler(e echo.Context) error
- func ChallengeHandler(e echo.Context) error
- func ChangeEmail(e echo.Context) error
- func ChangeEmailRequest(e echo.Context) (err error)
- func CheckForWorkflowPayment(e echo.Context) error
- func ConfigHandler(version string) echo.HandlerFunc
- func CreateApiKeyHandler(e echo.Context) error
- func DeleteApiKeyHandler(e echo.Context) error
- func DeleteSessionTokenHandler(e echo.Context) (err error)
- func DocumentDataHandler(e echo.Context) error
- func DocumentDeleteHandler(e echo.Context) error
- func DocumentEditHandler(e echo.Context) error
- func DocumentFileGetHandler(e echo.Context) error
- func DocumentFilePostHandler(e echo.Context) error
- func DocumentHandler(e echo.Context) error
- func DocumentNextHandler(e echo.Context) error
- func DocumentPrevHandler(e echo.Context) error
- func DocumentPreviewHandler(e echo.Context) error
- func Export(sess *sys.Session, exportEntities []portable.EntityType, e echo.Context, ...) error
- func ExportSettings(e echo.Context) error
- func ExportUser(e echo.Context) error
- func ExportUserData(e echo.Context) error
- func ExternalConfigRetrieve(e echo.Context) error
- func ExternalConfigStore(e echo.Context) error
- func ExternalConfigurationPage(e echo.Context) error
- func ExternalList(e echo.Context) error
- func ExternalRegister(e echo.Context) error
- func GetExport(e echo.Context) error
- func GetExportResults(e echo.Context) error
- func GetImportResults(e echo.Context) error
- func GetInit(e echo.Context) error
- func GetProfilePhotoHandler(e echo.Context) error
- func GetSessionTokenHandler(e echo.Context) (err error)
- func Init(paymentS service.PaymentService, userS service.UserService, ...)
- func InviteRequest(e echo.Context) (err error)
- func LoginHandler(e echo.Context) (err error)
- func LogoutHandler(e echo.Context) error
- func MeHandler(e echo.Context) error
- func MeUpdateHandler(e echo.Context) error
- func PostImport(e echo.Context) error
- func PostInit(e echo.Context) error
- func PublicIndexHTMLHandler(c echo.Context) error
- func PutProfilePhotoHandler(e echo.Context) error
- func PutTestSignature(e echo.Context) error
- func Register(e echo.Context) error
- func RegisterRequest(e echo.Context) (err error)
- func ResetPassword(e echo.Context) error
- func ResetPasswordRequest(e echo.Context) (err error)
- func SharedByLinkHTMLHandler(c echo.Context) error
- func SwitchUserHandler(e echo.Context) error
- func UpdateAddress(e echo.Context) error
- func UserBackendHTMLHandler(c echo.Context) error
- func UserDeleteHandler(e echo.Context) error
- func UserDocumentFileHandler(e echo.Context) error
- func UserDocumentGetHandler(e echo.Context) error
- func UserDocumentListHandler(e echo.Context) error
- func UserDocumentSignatureRequestAddHandler(e echo.Context) error
- func UserDocumentSignatureRequestGetByDocumentIDHandler(e echo.Context) error
- func UserDocumentSignatureRequestGetCurrentUserHandler(e echo.Context) error
- func UserDocumentSignatureRequestRejectHandler(e echo.Context) error
- func UserDocumentSignatureRequestRevokeHandler(e echo.Context) error
- func ValidateUserSession(e echo.Context) (err error)
- func WorkflowExecuteAtOnce(e echo.Context) error
- func WorkflowSchema(e echo.Context) error
- type ImportExportResult
- type UserWithPw
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminUserUpdateHandler ¶
Update a user's metadata
func ChallengeHandler ¶
Returns a string in plaintext, containing the message to be signed. Returns 400 => Bad Request if no session is found
func ChangeEmail ¶
Update a users' e-mail address
@param tokenID => string => Request token @returns
200 => OK 400 => Token request not found 417 => Data layer error }
func ChangeEmailRequest ¶
Start a users email change request
@param tokenRequest => {
Email string `json:"email" validate:"email=true,required=true"`
Token string `json:"token"`
UserID string `json:"userID"`
Role Role `json:"role"`
Type TokenType `json:"type"`
}
@returns
200 => OK 401 => Unauthorized 417 => E-Mail error 422 => Input error 500 => Token error }
func CheckForWorkflowPayment ¶
Check if a payment is required for current user for the workflow. Return http OK if no payment is required or if payment is required and a payment a matching payment with status = "confirmed" is found
func ConfigHandler ¶
func ConfigHandler(version string) echo.HandlerFunc
Returns an object containing the following config parameters
{
roles => string[] => Possible User Roles
blockchainNet => string => Settings.BlockchainNet
blockchainProxeusFSAddress => string => Settings.BlockchainContractAddress
version => string => Proxeus version
}
func CreateApiKeyHandler ¶
Remove the users' auth session
@params => {
name => string,
ID => string,
}
@returns
200 => apiKey string 400 => Data layer error/Validation error 401 => Unauthorized
func DeleteApiKeyHandler ¶
Remove the users' auth session
@params => {
ID => string,
}
@returns
200 => apiKey string 400 => Data layer error 401 => Unauthorized
func DeleteSessionTokenHandler ¶
Ends the context's session and returns 200 => OK in any case
func DocumentDataHandler ¶
Update a document with data
@params ID => string
FormInput => map[string]interface{}
@returns
200 => OK 400 => Bad request 422 => Unprocessable entity 500 => Server error
func DocumentDeleteHandler ¶
Delete a document
@params ID => string @returns
200 => OK 400 => Bad request
func DocumentEditHandler ¶
Update a document
@params ID => string, FormInput => interface{} @returns
200 => OK 400 => Bad request 422 => Unprocessable entity
func DocumentFileGetHandler ¶
Returns a document's file output
@params ID => string
inputName => string
@returns
200 => map[string]interface{}
404 => Not found
func DocumentFilePostHandler ¶
Attach a file to a document
@params @Fileinput
ID => string inputName => string
func DocumentHandler ¶
Process a document
@params ID => string @returns
200 => map[string]interface{}{"name" => string, "status" => string}
400 => Bad request
404 => Not found
422 => Unprocessable entity
500 => Server error
func DocumentNextHandler ¶
Move one step further in the document process
@params ID => string
final => boolean,
FormInput => map[string]interface{}
@returns
200 => map[string]interface{}
400 => Bad request
401 => Unauthorized
422 => Unprocessable entity
func DocumentPrevHandler ¶
Move one step back in the document process
@params ID => string @returns
200 => status => string 400 => Bad request
func DocumentPreviewHandler ¶
Returns a preview of the document in PDF form
func Export ¶
func Export(sess *sys.Session, exportEntities []portable.EntityType, e echo.Context, id ...string) error
Helper function for all exports
@returns
200 => File 400 => Bad Request 422 => Input error }
func ExportSettings ¶
Export platform settings
@returns
200 => File 400 => Bad Request 422 => Input error }
func ExportUser ¶
Export a user record
@params
contains string id string
@returns
200 => File 400 => Bad Request 422 => Input error }
func ExportUserData ¶
Exports user data
@params
contains string id string
@returns
200 => File 400 => Bad Request 401 => StatusUnauthorized 422 => Input error }
func ExternalConfigRetrieve ¶
Returns the config of an external node
func ExternalConfigStore ¶
Update the config of an external store
func ExternalConfigurationPage ¶
Instantiate an external node and return the config URL
func ExternalRegister ¶
Register an external node
@param node => {
ID string `json:"id" storm:"id"`
Name string `json:"name"`
Detail string `json:"detail"`
Url string `json:"url"`
Secret string `json:"secret"`
}
func GetExport ¶
Returns exported entities
@params
include string EntityType []string
@returns
200 => File 400 => Bad Request 422 => Input error }
func GetExportResults ¶
Returns the last exported records stored in the user session
@params @returns
200 => imexResults 401 => StatusUnauthorized }
func GetImportResults ¶
Returns the last imported records from the user session
@params
delete boolean
@returns
200 => imex results 401 => Unauthorized }
func GetInit ¶
Returns the platform settings and the "configured" flag that defines whether the user is configured or not
@returns
200 => map[string]interface{}{"settings": settings, "configured": configured}
500 => Server error
}
func GetProfilePhotoHandler ¶
Returns a profile photo
@params id => string @returns
200 => File 404 => Not found }
func Init ¶
func Init(paymentS service.PaymentService, userS service.UserService, workflowS service.WorkflowService, documentS service.DocumentService, userDocumentS service.UserDocumentService, fileS service.FileService, templateDocumentS service.TemplateDocumentService, signatureS service.SignatureService, emailS service.EmailService, formS service.FormService, formCompS service.FormComponentService, apiS service.ApiService, authS service.AuthenticationService, nodeS service.NodeService)
func InviteRequest ¶
Invite a user
@params TokenRequest struct {
Email string `json:"email" validate:"email=true,required=true"`
Token string `json:"token"`
UserID string `json:"userID"`
Role Role `json:"role"`
Type TokenType `json:"type"`
}
@returns
200 => OK 422 => unprocessable entity 500 => Server error }
func LoginHandler ¶
Create an auth session
@params => {
Signature string
Name string `json:"name" form:"name"`
Email string `json:"email" form:"email"`
Password string `json:"password" form:"password"`
Address string `json:"address" form:"address"`
}
@returns
200 => OK => {
"location": redirectAfterLogin(user.Role, string(referer)),
"created": created,
}
400 => Auth error
}
func LogoutHandler ¶
Remove the users' auth session
@params => nil @returns
200 => OK => {
"location": "/"
}
func MeHandler ¶
Returns the user object from the session
@params => - @returns
200 => User => {}
404 => Not found
}
func MeUpdateHandler ¶
Returns the user object from the session
@params => - @returns
200 => User => {}
404 => Not found
func PostImport ¶
Imports a file containing exported entities
@params
skipExisting string File File (in body)
@returns
200 => OK 400 => Bad Request 422 => Input error }
func PostInit ¶
Initialize the system
@params initStruct => struct {
Settings *model.Settings `json:"settings"`
User *usr `json:"user"`
}
@returns
200 => OK 422 => unprocessable entity 500 => Server error }
func PublicIndexHTMLHandler ¶
Returns the frontend.html file
func PutProfilePhotoHandler ¶
Returns the user object from the session
@params => - @returns
200 => User => {}
404 => Not found
func PutTestSignature ¶
func Register ¶
Persists a registration request
@params => {
string => token
string => password
}
@returns
200 => OK 417 => Token not found/User not found/Data Layer error 422 => Input validation error }
func RegisterRequest ¶
Handles a registration request
@params => {
Email string `json:"email" validate:"email=true,required=true"`
Token string `json:"token"`
UserID string `json:"userID"`
Role Role `json:"role"`
Type TokenType `json:"type"`
}
@returns
200 => OK 417 => E-Mail error 422 => Input validation error 500 => Data layer error }
func ResetPassword ¶
Reset a users' password
@params => string => tokenID @returns
200 => OK 417 => Data layer error 422 => Input validation error }
func ResetPasswordRequest ¶
Start a user password change request
@params => {
Email string `json:"email" validate:"email=true,required=true"`
Token string `json:"token"`
UserID string `json:"userID"`
Role Role `json:"role"`
Type TokenType `json:"type"`
}
@returns
200 => OK 400 => Token request not found 417 => E-Mail error 422 => Input validation error 500 => Token error }
func SharedByLinkHTMLHandler ¶
Returns the app.html file
func SwitchUserHandler ¶
root only feature to switch user by address - useful for permission checks
func UpdateAddress ¶
Update a users' blockchain address
@param loginForm => {
Signature string
Name string `json:"name" form:"name"`
Email string `json:"email" form:"email"`
Password string `json:"password" form:"password"`
Address string `json:"address" form:"address"`
}
@returns
200 => OK 401 => Unauthorized 422 => Challenge error/Signature error 500 => User not found }
func UserBackendHTMLHandler ¶
Returns the user.html file
func UserDeleteHandler ¶
Remove a user from the database
func UserDocumentFileHandler ¶
Returns a file belonging to a users document
func UserDocumentGetHandler ¶
Returns a documents metadata
func UserDocumentListHandler ¶
Returns a list of paginated user documents
func UserDocumentSignatureRequestAddHandler ¶
Add a signature request for a document
func UserDocumentSignatureRequestGetByDocumentIDHandler ¶
Returns a signature request based on a provided document ID
func UserDocumentSignatureRequestGetCurrentUserHandler ¶
Returns a signature request for the current user
func UserDocumentSignatureRequestRejectHandler ¶
Reject a signature request for a document
func UserDocumentSignatureRequestRevokeHandler ¶
Revoke a documents signature
func ValidateUserSession ¶
Validates user session cookie
func WorkflowExecuteAtOnce ¶
Execute a workflow at once
Types ¶
type ImportExportResult ¶
type ImportExportResult struct {
Filename string `json:"filename"`
Timestamp time.Time `json:"timestamp"`
Results portable.ProcessedResults `json:"results"`
}