Documentation ¶
Index ¶
Constants ¶
View Source
const ( DocumentHashHeader = "Document-Hash" PreviousDocumentHashHeader = "Previous-Document-Hash" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type AnnotationsBody ¶
type AnnotationsBody struct {
Annotations []Annotation `json:"annotations"`
}
type AnnotationsClient ¶
type AnnotationsClient interface { health.ExternalService GetAnnotations(ctx context.Context, uuid string) (AnnotationsBody, string, error) SaveAnnotations(ctx context.Context, uuid string, hash string, data AnnotationsBody) (AnnotationsBody, string, error) }
func NewAnnotationsClient ¶
func NewAnnotationsClient(endpoint string, client *http.Client) (AnnotationsClient, error)
type Publisher ¶
type Publisher interface { health.ExternalService Publish(ctx context.Context, uuid string, body map[string]interface{}) error PublishFromStore(ctx context.Context, uuid string) error SaveAndPublish(ctx context.Context, uuid string, hash string, body AnnotationsBody) error }
Publisher provides an interface to publish annotations to UPP
func NewPublisher ¶
func NewPublisher(originSystemID string, draftAnnotationsClient AnnotationsClient, publishedAnnotationsClient AnnotationsClient, publishEndpoint string, publishAuth string, gtgEndpoint string, client *http.Client) Publisher
NewPublisher returns a new Publisher instance
Click to show internal directories.
Click to hide internal directories.