api

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2023 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyticsHandler

func AnalyticsHandler(log hclog.Logger) http.Handler

Analytics handles user events for analytics

func ApprovalHandler

func ApprovalHandler(
	cfg *config.Config,
	l hclog.Logger,
	ar *algolia.Client,
	aw *algolia.Client,
	s *gw.Service) http.Handler

func DocumentHandler

func DocumentHandler(
	cfg *config.Config,
	l hclog.Logger,
	ar *algolia.Client,
	aw *algolia.Client,
	s *gw.Service,
	db *gorm.DB) http.Handler

func DocumentTypesHandler

func DocumentTypesHandler(cfg config.Config, log hclog.Logger) http.Handler

func DraftsDocumentHandler

func DraftsDocumentHandler(
	cfg *config.Config,
	l hclog.Logger,
	ar *algolia.Client,
	aw *algolia.Client,
	s *gw.Service) http.Handler

func DraftsHandler

func DraftsHandler(
	cfg *config.Config,
	l hclog.Logger,
	ar *algolia.Client,
	aw *algolia.Client,
	s *gw.Service,
	db *gorm.DB) http.Handler

func MeSubscriptionsHandler

func MeSubscriptionsHandler(
	cfg *config.Config,
	l hclog.Logger,
	s *gw.Service,
	db *gorm.DB,
) http.Handler

func PeopleDataHandler

func PeopleDataHandler(
	cfg *config.Config,
	log hclog.Logger,
	s *gw.Service) http.Handler

PeopleDataHandler returns people related data from the Google API to the Hermes frontend.

func ProductsHandler

func ProductsHandler(cfg *config.Config, a *algolia.Client, log hclog.Logger) http.Handler

ProductsHandler returns the product mappings to the Hermes frontend.

func ReviewHandler

func ReviewHandler(
	cfg *config.Config,
	l hclog.Logger,
	ar *algolia.Client,
	aw *algolia.Client,
	s *gw.Service,
	db *gorm.DB,
) http.Handler

Types

type AnalyticsRequest

type AnalyticsRequest struct {
	DocumentID  string `json:"document_id"`
	ProductName string `json:"product_name"`
}

type AnalyticsResponse

type AnalyticsResponse struct {
	Recorded bool `json:"recorded"`
}

type DocumentPatchRequest

type DocumentPatchRequest struct {
	Approvers    []string `json:"approvers,omitempty"`
	Contributors []string `json:"contributors,omitempty"`
	Status       string   `json:"status,omitempty"`
	Summary      string   `json:"summary,omitempty"`
	// Tags                []string `json:"tags,omitempty"`
	Title string `json:"title,omitempty"`

	// TODO: These are all current custom editable fields for all supported doc
	// types. We should instead make this dynamic.
	CurrentVersion string   `json:"currentVersion,omitempty"`
	PRD            string   `json:"prd,omitempty"`
	PRFAQ          string   `json:"prfaq,omitempty"`
	RFC            string   `json:"rfc,omitempty"`
	Stakeholders   []string `json:"stakeholders,omitempty"`
	TargetVersion  string   `json:"targetVersion,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"`
	Summary      string   `json:"summary,omitempty"`
	// Tags                []string `json:"tags,omitempty"`
	Title string `json:"title,omitempty"`

	// TODO: These are all current custom editable fields for all supported doc
	// types. We should instead make this dynamic.
	CurrentVersion string   `json:"currentVersion,omitempty"`
	PRD            string   `json:"prd,omitempty"`
	PRFAQ          string   `json:"prfaq,omitempty"`
	RFC            string   `json:"rfc,omitempty"`
	Stakeholders   []string `json:"stakeholders,omitempty"`
	TargetVersion  string   `json:"targetVersion,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"`
	Owner               string   `json:"owner,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 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL