Documentation ¶
Index ¶
- func AnalyticsHandler(srv server.Server) http.Handler
- func ApprovalsHandler(srv server.Server) http.Handler
- func CompareAlgoliaAndDatabaseDocument(algoDoc map[string]any, dbDoc models.Document, ...) error
- func DocumentHandler(srv server.Server) http.Handler
- func DocumentTypesHandler(srv server.Server) http.Handler
- func DraftsDocumentHandler(srv server.Server) http.Handler
- func DraftsHandler(srv server.Server) http.Handler
- func JiraIssueHandler(srv server.Server) http.Handler
- func JiraIssuePickerHandler(srv server.Server) http.Handler
- func MeHandler(srv server.Server) http.Handler
- func MeRecentlyViewedDocsHandler(srv server.Server) http.Handler
- func MeSubscriptionsHandler(srv server.Server) http.Handler
- func PeopleDataHandler(srv server.Server) http.Handler
- func ProductsHandler(srv server.Server) http.Handler
- func ProjectHandler(srv server.Server) http.Handler
- func ProjectsHandler(srv server.Server) http.Handler
- func ReviewsHandler(srv server.Server) http.Handler
- type AnalyticsRequest
- type AnalyticsResponse
- type DocumentPatchRequest
- type DraftsPatchRequest
- type DraftsRequest
- type DraftsResponse
- type JiraIssueGetResponse
- type JiraIssuePickerGetResponse
- type JiraIssuePickerGetResponseIssue
- type MeGetResponse
- type MeSubscriptionsPostRequest
- type PeopleDataRequest
- type ProjectGetResponse
- type ProjectPatchRequest
- type ProjectRelatedResourcesGetResponse
- type ProjectRelatedResourcesGetResponseExternalLink
- type ProjectRelatedResourcesGetResponseHermesDocument
- type ProjectRelatedResourcesPutRequest
- type ProjectRelatedResourcesPutRequestExternalLink
- type ProjectRelatedResourcesPutRequestHermesDocument
- type ProjectsGetResponse
- type ProjectsPostRequest
- type ProjectsPostResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyticsHandler ¶
Analytics handles user events for analytics
func CompareAlgoliaAndDatabaseDocument ¶
func CompareAlgoliaAndDatabaseDocument( algoDoc map[string]any, dbDoc models.Document, dbDocReviews models.DocumentReviews, docTypes []*config.DocumentType, ) error
CompareAlgoliaAndDatabaseDocument compares data for a document stored in Algolia and the database to determine any inconsistencies, which are returned back as a (multierror) error.
func JiraIssueHandler ¶
JiraIssueHandler proxies Jira issue API requests.
func JiraIssuePickerHandler ¶
JiraIssuePickerHandler proxies Jira issue picker API requests.
func PeopleDataHandler ¶
PeopleDataHandler returns people related data from the Google API to the Hermes frontend.
func ProductsHandler ¶
ProductsHandler returns the product mappings to the Hermes frontend.
Types ¶
type AnalyticsRequest ¶
type AnalyticsResponse ¶
type AnalyticsResponse struct {
Recorded bool `json:"recorded"`
}
type DocumentPatchRequest ¶
type DocumentPatchRequest struct { Approvers *[]string `json:"approvers,omitempty"` Contributors *[]string `json:"contributors,omitempty"` CustomFields *[]document.CustomField `json:"customFields,omitempty"` Status *string `json:"status,omitempty"` Summary *string `json:"summary,omitempty"` // Tags []string `json:"tags,omitempty"` Title *string `json:"title,omitempty"` }
DocumentPatchRequest contains a subset of documents fields that are allowed to be updated with a PATCH request.
type DraftsPatchRequest ¶
type DraftsPatchRequest struct { Approvers *[]string `json:"approvers,omitempty"` Contributors *[]string `json:"contributors,omitempty"` CustomFields *[]document.CustomField `json:"customFields,omitempty"` Product *string `json:"product,omitempty"` Summary *string `json:"summary,omitempty"` // Tags []string `json:"tags,omitempty"` Title *string `json:"title,omitempty"` }
DraftsPatchRequest contains a subset of drafts fields that are allowed to be updated with a PATCH request.
type DraftsRequest ¶
type DraftsRequest struct { Approvers []string `json:"approvers,omitempty"` Contributors []string `json:"contributors,omitempty"` DocType string `json:"docType,omitempty"` Product string `json:"product,omitempty"` ProductAbbreviation string `json:"productAbbreviation,omitempty"` Summary string `json:"summary,omitempty"` Tags []string `json:"tags,omitempty"` Title string `json:"title"` }
type DraftsResponse ¶
type DraftsResponse struct {
ID string `json:"id"`
}
type JiraIssueGetResponse ¶
type JiraIssueGetResponse struct { Assignee string `json:"assignee,omitempty"` AssigneeAvatar string `json:"assigneeAvatar,omitempty"` IssueType string `json:"issueType"` IssueTypeImage string `json:"issueTypeImage"` Key string `json:"key"` Priority string `json:"priority"` PriorityImage string `json:"priorityImage"` Project string `json:"project"` Reporter string `json:"reporter"` Status string `json:"status"` Summary string `json:"summary"` URL string `json:"url"` }
type JiraIssuePickerGetResponse ¶
type JiraIssuePickerGetResponse []JiraIssuePickerGetResponseIssue
type MeGetResponse ¶
type MeGetResponse struct { ID string `json:"id"` Email string `json:"email"` VerifiedEmail bool `json:"verified_email"` Name string `json:"name"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Picture string `json:"picture"` Locale string `json:"locale,omitempty"` HD string `json:"hd,omitempty"` }
MeGetResponse mimics the response from Google's `userinfo/me` API (https://www.googleapis.com/userinfo/v2/me).
type MeSubscriptionsPostRequest ¶
type MeSubscriptionsPostRequest struct {
Subscriptions []string `json:"subscriptions"`
}
type PeopleDataRequest ¶
type PeopleDataRequest struct {
Query string `json:"query,omitempty"`
}
PeopleDataRequest contains the fields that are allowed to make the POST request.
type ProjectGetResponse ¶
type ProjectGetResponse struct {
// contains filtered or unexported fields
}
type ProjectPatchRequest ¶
type ProjectRelatedResourcesGetResponse ¶
type ProjectRelatedResourcesGetResponse struct { ExternalLinks []ProjectRelatedResourcesGetResponseExternalLink `json:"externalLinks,omitempty"` HermesDocuments []ProjectRelatedResourcesGetResponseHermesDocument `json:"hermesDocuments,omitempty"` }
type ProjectRelatedResourcesGetResponseHermesDocument ¶
type ProjectRelatedResourcesGetResponseHermesDocument struct { GoogleFileID string `json:"googleFileID"` Title string `json:"title"` CreatedTime int64 `json:"createdTime"` DocumentType string `json:"documentType"` DocumentNumber string `json:"documentNumber"` ModifiedTime int64 `json:"modifiedTime"` Owners []string `json:"owners"` OwnerPhotos []string `json:"ownerPhotos,omitempty"` Product string `json:"product"` SortOrder int `json:"sortOrder"` Status string `json:"status"` Summary string `json:"summary"` }
type ProjectRelatedResourcesPutRequest ¶
type ProjectRelatedResourcesPutRequest struct { ExternalLinks []ProjectRelatedResourcesPutRequestExternalLink `json:"externalLinks,omitempty"` HermesDocuments []ProjectRelatedResourcesPutRequestHermesDocument `json:"hermesDocuments,omitempty"` }
type ProjectsGetResponse ¶
type ProjectsGetResponse []project
type ProjectsPostRequest ¶
type ProjectsPostResponse ¶
type ProjectsPostResponse struct {
ID int `json:"id"`
}