content

package
v0.0.0-...-b14c162 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentItemPaginationQueryString

func ContentItemPaginationQueryString(parameters ContentItemPaginationParameters) string

func ContentTypePaginationQueryString

func ContentTypePaginationQueryString(parameters StatusPaginationParameters) string

func ContentTypeSchemaPaginationQueryString

func ContentTypeSchemaPaginationQueryString(parameters StatusPaginationParameters) string

func PaginationQueryString

func PaginationQueryString(parameters PaginationParameters) string

Types

type AlgoliaIndex

type AlgoliaIndex struct {
	ID               string          `json:"id,omitempty"`
	ParentID         string          `json:"parentId,omitempty"`
	Label            string          `json:"label"`
	Name             string          `json:"name"`
	Type             string          `json:"type"` // PRODUCTION, STAGING
	Suffix           string          `json:"suffix"`
	ReplicaCount     int             `json:"replicaCount"`
	CreatedDate      *time.Time      `json:"createdDate,omitempty"`
	LastModifiedDate *time.Time      `json:"lastModifiedDate,omitempty"`
	Links            map[string]Link `json:"_links"`
}

type AlgoliaIndexInput

type AlgoliaIndexInput struct {
	Suffix               string                     `json:"suffix"`
	Label                string                     `json:"label"`
	Type                 string                     `json:"type"` // PRODUCTION, STAGING
	AssignedContentTypes []AssignedContentTypeInput `json:"assignedContentTypes"`
}

type AlgoliaIndexResults

type AlgoliaIndexResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []AlgoliaIndex
}

func (*AlgoliaIndexResults) UnmarshalJSON

func (r *AlgoliaIndexResults) UnmarshalJSON(data []byte) error

type AlgoliaIndexSettings

type AlgoliaIndexSettings struct {
	// NumericAttributesToIndex interface{} `json:"numericAttributesToIndex"`
	MinWordSizefor1Typo     int      `json:"minWordSizefor1Typo"`
	MinWordSizefor2Typos    int      `json:"minWordSizefor2Typos"`
	HitsPerPage             int      `json:"hitsPerPage"`
	MaxValuesPerFacet       int      `json:"maxValuesPerFacet"`
	Version                 int      `json:"version"`
	SearchableAttributes    []string `json:"searchableAttributes"`
	AttributesToRetrieve    []string `json:"attributesToRetrieve"`
	UnretrievableAttributes []string `json:"unretrievableAttributes"`
	OptionalWords           []string `json:"optionalWords"`
	AttributesForFaceting   []string `json:"attributesForFaceting"`
	AttributesToSnippet     []string `json:"attributesToSnippet"`
	AttributesToHighlight   []string `json:"attributesToHighlight"`
	PaginationLimitedTo     int      `json:"paginationLimitedTo"`
	AttributeForDistinct    string   `json:"attributeForDistinct"`
	ExactOnSingleWordQuery  string   `json:"exactOnSingleWordQuery"`
	Ranking                 []string `json:"ranking"`
	CustomRanking           []string `json:"customRanking"`
	SeparatorsToIndex       string   `json:"separatorsToIndex"`
	RemoveWordsIfNoResults  string   `json:"removeWordsIfNoResults"`
	QueryType               string   `json:"queryType"`
	HighlightPreTag         string   `json:"highlightPreTag"`
	HighlightPostTag        string   `json:"highlightPostTag"`
	SnippetEllipsisText     string   `json:"snippetEllipsisText"`
	AlternativesAsExact     []string `json:"alternativesAsExact"`
}

https://www.algolia.com/doc/api-reference/api-parameters/

type ArchiveInput

type ArchiveInput struct {
	Version int `json:"version"`
}

type AssignedContentType

type AssignedContentType struct {
	ID               string          `json:"id,omitempty"`
	ContentTypeUri   string          `json:"contentTypeUri"`
	CreatedDate      *time.Time      `json:"createdDate,omitempty"`
	LastModifiedDate *time.Time      `json:"lastModifiedDate,omitempty"`
	Links            map[string]Link `json:"_links"`
}

type AssignedContentTypeInput

type AssignedContentTypeInput struct {
	ContentTypeUri string `json:"contentTypeUri"`
}

type AssignedContentTypeResults

type AssignedContentTypeResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []AssignedContentType
}

func (*AssignedContentTypeResults) UnmarshalJSON

func (r *AssignedContentTypeResults) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *ClientConfig) (*Client, error)

NewClient creates a new Client object

func (*Client) AlgoliaIndexCreate

func (client *Client) AlgoliaIndexCreate(hub_id string, input AlgoliaIndexInput) (AlgoliaIndex, error)

func (*Client) AlgoliaIndexDelete

func (client *Client) AlgoliaIndexDelete(hub_id string, id string) (AlgoliaIndex, error)

func (*Client) AlgoliaIndexGet

func (client *Client) AlgoliaIndexGet(hub_id string, id string) (AlgoliaIndex, error)

func (*Client) AlgoliaIndexList

func (client *Client) AlgoliaIndexList(hub_id string) (AlgoliaIndexResults, error)

func (*Client) AlgoliaIndexSettingsGet

func (client *Client) AlgoliaIndexSettingsGet(hub_id string, id string) (AlgoliaIndexSettings, error)

func (*Client) AlgoliaIndexSettingsUpdate

func (client *Client) AlgoliaIndexSettingsUpdate(hub_id string, id string, input AlgoliaIndexSettings) (AlgoliaIndexSettings, error)

func (*Client) AlgoliaIndexUpdate

func (client *Client) AlgoliaIndexUpdate(hubID string, current AlgoliaIndex, input AlgoliaIndexInput) (AlgoliaIndex, error)

func (*Client) AlgoliaIndexWebhooksGet

func (client *Client) AlgoliaIndexWebhooksGet(hub_id string, id string) ([]Webhook, error)

func (*Client) ContentItemArchive

func (client *Client) ContentItemArchive(id string, version int) (ContentItem, error)

ContentItemArchive archives a content item

func (*Client) ContentItemCreate

func (client *Client) ContentItemCreate(repositoryID string, input ContentItemInput) (ContentItem, error)

ContentItemCreate creates a new content item

func (*Client) ContentItemGet

func (client *Client) ContentItemGet(id string) (ContentItem, error)

ContentItemGet returns the content item with the given id

func (*Client) ContentItemGetAll

func (client *Client) ContentItemGetAll(hubID string, status ContentStatus) ([]ContentItem, error)

func (*Client) ContentItemList

func (client *Client) ContentItemList(repositoryID string, parameters ContentItemPaginationParameters) (ContentItemResults, error)

ContentItemList lists all of the Content Items within the given Content Repository

func (*Client) ContentItemListHistory

func (client *Client) ContentItemListHistory(id string, version int) (ContentItemVersionHistoryResults, error)

ContentItemListHistory list history of this item

func (*Client) ContentItemUnarchive

func (client *Client) ContentItemUnarchive(id string, version int) (ContentItem, error)

ContentItemUnarchive unarchives a content item

func (*Client) ContentItemUpdate

func (client *Client) ContentItemUpdate(current ContentItem, input ContentItemInput) (ContentItem, error)

ContentItemUpdate updates a Content Item. Please note that deliveryKey can only be set when Content Delivery 2 is enabled.

func (*Client) ContentRepositoryAssignContentType

func (client *Client) ContentRepositoryAssignContentType(repositoryID string, typeID string) (ContentRepository, error)

ContentRepositoryAssignContentType assigns a Content Type to a Content Repository

func (*Client) ContentRepositoryAssignFeature

func (client *Client) ContentRepositoryAssignFeature(repositoryID string)

func (*Client) ContentRepositoryCreate

func (client *Client) ContentRepositoryCreate(hubID string, input ContentRepositoryInput) (ContentRepository, error)

func (*Client) ContentRepositoryFind

func (client *Client) ContentRepositoryFind()

func (*Client) ContentRepositoryGet

func (client *Client) ContentRepositoryGet(id string) (ContentRepository, error)

ContentRepositoryGet returns a ContentRepository for the given id

func (*Client) ContentRepositoryGetAll

func (client *Client) ContentRepositoryGetAll(hubID string) ([]ContentRepository, error)

func (*Client) ContentRepositoryList

func (client *Client) ContentRepositoryList(hubID string, parameters PaginationParameters) (ContentRepositoryResults, error)

func (*Client) ContentRepositoryRemoveContentType

func (client *Client) ContentRepositoryRemoveContentType(repositoryID string, typeID string) (ContentRepository, error)

ContentRepositoryRemoveContentType removes a Content Type from a Content Repository

func (*Client) ContentRepositoryRemoveFeature

func (client *Client) ContentRepositoryRemoveFeature(repositoryID string)

func (*Client) ContentRepositoryShare

func (client *Client) ContentRepositoryShare()

func (*Client) ContentRepositoryUpdate

func (client *Client) ContentRepositoryUpdate(current ContentRepository, input ContentRepositoryInput) (ContentRepository, error)

func (*Client) ContentTypeArchive

func (client *Client) ContentTypeArchive(id string) (ContentType, error)

func (*Client) ContentTypeCreate

func (client *Client) ContentTypeCreate(hubID string, input ContentTypeInput) (ContentType, error)

func (*Client) ContentTypeFindByUri

func (client *Client) ContentTypeFindByUri(uri string, hubId string) (ContentType, error)

func (*Client) ContentTypeGet

func (client *Client) ContentTypeGet(id string) (ContentType, error)

func (*Client) ContentTypeGetAll

func (client *Client) ContentTypeGetAll(hubID string, status ContentStatus) ([]ContentType, error)

func (*Client) ContentTypeList

func (client *Client) ContentTypeList(hubID string, parameters StatusPaginationParameters) (ContentTypeResults, error)

func (*Client) ContentTypeSchemaArchive

func (client *Client) ContentTypeSchemaArchive(id string, version int) (ContentTypeSchema, error)

func (*Client) ContentTypeSchemaCreate

func (client *Client) ContentTypeSchemaCreate(hubID string, update ContentTypeSchemaInput) (ContentTypeSchema, error)

func (*Client) ContentTypeSchemaFindBySchemaId

func (client *Client) ContentTypeSchemaFindBySchemaId(schemaId string, hubId string) (ContentTypeSchema, error)

func (*Client) ContentTypeSchemaGet

func (client *Client) ContentTypeSchemaGet(id string) (ContentTypeSchema, error)

func (*Client) ContentTypeSchemaGetAll

func (client *Client) ContentTypeSchemaGetAll(hubID string, status ContentStatus) ([]ContentTypeSchema, error)

func (*Client) ContentTypeSchemaList

func (client *Client) ContentTypeSchemaList(hubID string, parameters StatusPaginationParameters) (ContentTypeSchemaResults, error)

func (*Client) ContentTypeSchemaUnarchive

func (client *Client) ContentTypeSchemaUnarchive(id string, version int) (ContentTypeSchema, error)

func (*Client) ContentTypeSchemaUpdate

func (client *Client) ContentTypeSchemaUpdate(current ContentTypeSchema, update ContentTypeSchemaInput) (ContentTypeSchema, error)

func (*Client) ContentTypeSyncSchema

func (client *Client) ContentTypeSyncSchema(current ContentType) (ContentTypeSyncResult, error)

func (*Client) ContentTypeUnarchive

func (client *Client) ContentTypeUnarchive(id string) (ContentType, error)

func (*Client) ContentTypeUpdate

func (client *Client) ContentTypeUpdate(current ContentType, input ContentTypeInput) (ContentType, error)

func (*Client) FolderCreate

func (client *Client) FolderCreate(repositoryID string, input FolderInput) (FolderInput, error)

func (*Client) FolderDelete

func (client *Client) FolderDelete(id string) (Folder, error)

func (*Client) FolderGet

func (client *Client) FolderGet(id string) (Folder, error)

func (*Client) FolderGetAll

func (client *Client) FolderGetAll(hubID string) ([]Folder, error)

func (*Client) FolderList

func (client *Client) FolderList(repositoryID string, parameters PaginationParameters) (FolderResults, error)

func (*Client) HubCreate

func (client *Client) HubCreate()

func (*Client) HubGet

func (client *Client) HubGet(ID string) (Hub, error)

func (*Client) HubGetAll

func (client *Client) HubGetAll() ([]Hub, error)

func (*Client) HubList

func (client *Client) HubList(parameters PaginationParameters) (HubResults, error)

func (*Client) HubUpdate

func (client *Client) HubUpdate()

func (*Client) WebhookCreate

func (client *Client) WebhookCreate(hubID string, input WebhookInput) (Webhook, error)

func (*Client) WebhookDelete

func (client *Client) WebhookDelete(hub_id string, id string) error

func (*Client) WebhookGet

func (client *Client) WebhookGet(hubID string, ID string) (Webhook, error)

func (*Client) WebhookGetAll

func (client *Client) WebhookGetAll(hubID string) ([]Webhook, error)

func (*Client) WebhookList

func (client *Client) WebhookList(hub_id string, parameters PaginationParameters) (WebhookResults, error)

func (*Client) WebhookUpdate

func (client *Client) WebhookUpdate(hubID string, current Webhook, input WebhookInput) (Webhook, error)

type ClientConfig

type ClientConfig struct {
	ClientID     string
	ClientSecret string
	URL          string
	AuthURL      string
	HTTPClient   *http.Client
}

ClientConfig is used to initialize a new Client

type ContentItem

type ContentItem struct {
	ID                  string `json:"id"`
	ContentRepositoryID string `json:"contentRepositoryId"`
	FolderID            string `json:"folderId"`

	Body                 map[string]interface{} `json:"body"`
	Version              int                    `json:"version"`
	Label                string                 `json:"label"`
	Status               string                 `json:"status"`
	CreatedBy            string                 `json:"createdBy"`
	Locale               string                 `json:"locale"`
	CreatedDate          *time.Time             `json:"createdDate"`
	LastModifiedBy       string                 `json:"lastModifiedBy"`
	LastModifiedDate     *time.Time             `json:"lastModifiedDate"`
	LastPublishedVersion int                    `json:"lastPublishedVersion"`
	LastPublishedDate    *time.Time             `json:"lastPublishedDate"`
	DeliveryID           string                 `json:"deliveryId"`
	Links                map[string]Link        `json:"_links"`
}

type ContentItemAction

type ContentItemAction struct {
	Code string                 `json:"code"`
	Data map[string]interface{} `json:"data"`
}

type ContentItemInput

type ContentItemInput struct {
	Body     map[string]interface{} `json:"body"`
	Label    string                 `json:"label"`
	FolderID string                 `json:"folderId"`
	Locale   string                 `json:"locale"`
}

type ContentItemPaginationParameters

type ContentItemPaginationParameters struct {
	Page                        int
	Size                        int
	Sort                        string
	Status                      ContentStatus
	FolderId                    string
	Projection                  Projection
	ExcludeHierarchicalChildren bool
}

type ContentItemResults

type ContentItemResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []ContentItem
}

ContentItemResults is returned by the ContentItemList func

func (*ContentItemResults) UnmarshalJSON

func (r *ContentItemResults) UnmarshalJSON(data []byte) error

UnmarshalJSON is a custom unmarshaller for the embedded content

type ContentItemVersionHistory

type ContentItemVersionHistory struct {
	HistoryEventID string            `json:"historyEventId"`
	ContentItemId  string            `json:"contentItemId"`
	Version        int               `json:"version"`
	CreatedDate    *time.Time        `json:"createdDate"`
	CreatedBy      string            `json:"createdBy"`
	Action         ContentItemAction `json:"action"`
}

type ContentItemVersionHistoryResults

type ContentItemVersionHistoryResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []ContentItemVersionHistory
}

ContentItemResults is returned by the ContentItemList func

func (*ContentItemVersionHistoryResults) UnmarshalJSON

func (r *ContentItemVersionHistoryResults) UnmarshalJSON(data []byte) error

UnmarshalJSON is a custom unmarshaller for the embedded content

type ContentRepository

type ContentRepository struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Label        string `json:"label"`
	Status       string `json:"status"`
	Type         string `json:"type"`
	HubID        string
	Links        map[string]Link        `json:"_links"`
	ContentTypes []ContentTypeReference `json:"contentTypes"`
}

func (*ContentRepository) GetHub

func (r *ContentRepository) GetHub(client *Client) (Hub, error)

type ContentRepositoryInput

type ContentRepositoryInput struct {
	Name  string `json:"name"`
	Label string `json:"label"`
}

type ContentRepositoryResults

type ContentRepositoryResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []ContentRepository
}

func (*ContentRepositoryResults) UnmarshalJSON

func (r *ContentRepositoryResults) UnmarshalJSON(data []byte) error

type ContentStatus

type ContentStatus string
const (
	StatusAny      ContentStatus = ""
	StatusActive   ContentStatus = "ACTIVE"
	StatusArchived ContentStatus = "ARCHIVED"
)

type ContentType

type ContentType struct {
	ID             string              `json:"id"`
	ContentTypeURI string              `json:"contentTypeUri"`
	Status         string              `json:"status"`
	Settings       ContentTypeSettings `json:"settings,omitempty"`
	Links          map[string]Link     `json:"_links"`
}

type ContentTypeIcon

type ContentTypeIcon struct {
	Size int    `json:"size"`
	URL  string `json:"url"`
}

type ContentTypeInput

type ContentTypeInput struct {
	ContentTypeURI string              `json:"contentTypeUri"`
	Settings       ContentTypeSettings `json:"settings,omitempty"`
}

type ContentTypeReference

type ContentTypeReference struct {
	HubContentTypeID string `json:"hubContentTypeId"`
	ContentTypeURI   string `json:"contentTypeUri"`
}

type ContentTypeResults

type ContentTypeResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []ContentType
}

func (*ContentTypeResults) UnmarshalJSON

func (r *ContentTypeResults) UnmarshalJSON(data []byte) error

type ContentTypeSchema

type ContentTypeSchema struct {
	ID               string          `json:"id"`
	Body             string          `json:"body"`
	Version          int             `json:"version"`
	Status           string          `json:"status"`
	CreatedBy        string          `json:"createdBy"`
	CreatedDate      *time.Time      `json:"createdDate"`
	LastModifiedBy   string          `json:"lastModifiedBy"`
	LastModifiedDate *time.Time      `json:"lastModifiedDate"`
	Links            map[string]Link `json:"_links"`
	SchemaID         string          `json:"schemaId"`
	ValidationLevel  string          `json:"validationLevel"`
}

type ContentTypeSchemaInput

type ContentTypeSchemaInput struct {
	SchemaID        string `json:"schemaId,omitempty"`
	Body            string `json:"body,omitempty"`
	ValidationLevel string `json:"validationLevel,omitempty"`
}

type ContentTypeSchemaResults

type ContentTypeSchemaResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []ContentTypeSchema
}

func (*ContentTypeSchemaResults) UnmarshalJSON

func (r *ContentTypeSchemaResults) UnmarshalJSON(data []byte) error

type ContentTypeSettings

type ContentTypeSettings struct {
	Label          string                     `json:"label"`
	Icons          []ContentTypeIcon          `json:"icons,omitempty"`
	Visualizations []ContentTypeVisualization `json:"visualizations,omitempty"`
}

type ContentTypeSyncResult

type ContentTypeSyncResult struct {
	ContentTypeURI string `json:"contentTypeUri"`
}

type ContentTypeVisualization

type ContentTypeVisualization struct {
	Label        string `json:"label"`
	TemplatedURI string `json:"templatedUri"`
	Default      bool   `json:"default"`
}

type ErrorObject

type ErrorObject struct {
	Entity       string `json:"entity"`
	Property     string `json:"property"`
	InvalidValue string `json:"invalidValue"`
	Message      string `json:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	Inner      error
	StatusCode int
	Errors     []ErrorObject `json:"errors"`
}

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

func (*ErrorResponse) Unwrap

func (e *ErrorResponse) Unwrap() error

Unwrap is used to make it work with errors.Is, errors.As.

type Folder

type Folder struct {
	ID    string          `json:"id"`
	Name  string          `json:"name"`
	Links map[string]Link `json:"_links"`
}

type FolderInput

type FolderInput struct {
	Name string `json:"name"`
}

type FolderResults

type FolderResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []Folder
}

ContentItemResults is returned by the ContentItemList func

func (*FolderResults) UnmarshalJSON

func (r *FolderResults) UnmarshalJSON(data []byte) error

UnmarshalJSON is a custom unmarshaller for the embedded content

type GenericListResults

type GenericListResults struct {
	Embedded map[string]interface{} `json:"_embedded"`
	Links    map[string]Link        `json:"_links"`
	Page     PageInformation        `json:"page"`
}

type Hub

type Hub struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name"`
	Label       string `json:"label"`
	Description string `json:"description"`
	Status      string `json:"status"`

	CreatedBy        string     `json:"createdBy"`
	CreatedDate      *time.Time `json:"createdDate"`
	LastModifiedBy   string     `json:"lastModifiedBy"`
	LastModifiedDate *time.Time `json:"lastModifiedDate"`
}

type HubResults

type HubResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []Hub
}

func (*HubResults) UnmarshalJSON

func (r *HubResults) UnmarshalJSON(data []byte) error
type Link struct {
	Href string `json:"href"`
}

type Notification

type Notification struct {
	Email string
}

type PageInformation

type PageInformation struct {
	Size          int `json:"size"`
	Number        int `json:"number"`
	TotalElements int `json:"totalElements"`
	TotalPages    int `json:"totalPages"`
}

type PaginationParameters

type PaginationParameters struct {
	Page int
	Size int
	Sort string
}

type Projection

type Projection string
const (
	ProjectionAny   Projection = ""
	ProjectionBasic Projection = "basic"
)

type StatusPaginationParameters

type StatusPaginationParameters struct {
	Page   int
	Size   int
	Sort   string
	Status ContentStatus
}

type Webhook

type Webhook struct {
	ID               string                `json:"id,omitempty"`
	Label            string                `json:"label"`
	Events           []string              `json:"events"`
	Handlers         []string              `json:"handlers"`
	Active           bool                  `json:"active"`
	Notifications    []Notification        `json:"notifications"`
	Secret           string                `json:"secret"`
	CreatedDate      *time.Time            `json:"createdDate,omitempty"`
	LastModifiedDate *time.Time            `json:"lastModifiedDate,omitempty"`
	Headers          []WebhookHeader       `json:"headers,omitempty"`
	Filters          []WebhookFilter       `json:"filters,omitempty"`
	Method           string                `json:"method"`
	CustomPayload    *WebhookCustomPayload `json:"customPayload,omitempty"`
}

func (*Webhook) UnmarshalJSON

func (obj *Webhook) UnmarshalJSON(data []byte) error

type WebhookCustomPayload

type WebhookCustomPayload struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type WebhookEventsEnum

type WebhookEventsEnum string
const (
	WebhookContentItemAssigned        WebhookEventsEnum = "dynamic-content.content-item.assigned"
	WebhookContentItemCreated         WebhookEventsEnum = "dynamic-content.content-item.created"
	WebhookContentItemUpdated         WebhookEventsEnum = "dynamic-content.content-item.updated"
	WebhookContentItemWorkflowUpdated WebhookEventsEnum = "dynamic-content.content-item.workflow.updated"
	WebhookEditionPublished           WebhookEventsEnum = "dynamic-content.edition.published"
	WebhookEditionScheduled           WebhookEventsEnum = "dynamic-content.edition.scheduled"
	WebhookEditionUnscheduled         WebhookEventsEnum = "dynamic-content.edition.unscheduled"
	WebhookSnapshotPublished          WebhookEventsEnum = "dynamic-content.snapshot.published"
)

type WebhookFilter

type WebhookFilter interface{}

type WebhookFilterEqual

type WebhookFilterEqual struct {
	Type     string `json:"type"`
	JSONPath string
	Value    string
}

func (WebhookFilterEqual) MarshalJSON

func (obj WebhookFilterEqual) MarshalJSON() ([]byte, error)

type WebhookFilterIn

type WebhookFilterIn struct {
	Type     string `json:"type"`
	JSONPath string
	Values   []string `json:"values"`
}

func (WebhookFilterIn) MarshalJSON

func (obj WebhookFilterIn) MarshalJSON() ([]byte, error)

type WebhookHeader

type WebhookHeader struct {
	Key    string `json:"key"`
	Value  string `json:"value"`
	Secret bool   `json:"secret"`
}

type WebhookInput

type WebhookInput struct {
	Label         string                `json:"label"`
	Events        []string              `json:"events"`
	Handlers      []string              `json:"handlers"`
	Active        bool                  `json:"active"`
	Notifications []Notification        `json:"notifications"`
	Secret        string                `json:"secret"`
	Headers       []WebhookHeader       `json:"headers,omitempty"`
	Filters       []WebhookFilter       `json:"filters,omitempty"`
	Method        string                `json:"method"`
	CustomPayload *WebhookCustomPayload `json:"customPayload,omitempty"`
}

func (*WebhookInput) UnmarshalJSON

func (obj *WebhookInput) UnmarshalJSON(data []byte) error

type WebhookResults

type WebhookResults struct {
	Links map[string]Link `json:"_links"`
	Page  PageInformation `json:"page"`
	Items []Webhook
}

func (*WebhookResults) UnmarshalJSON

func (r *WebhookResults) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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