cca

package module
v2.14.4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 21 Imported by: 0

README

CCA Client

CCA Client is the offical Go client for CCA.

See the rpc directory for API declarations if you want to generate a client for another language.

Documentation

Index

Constants

View Source
const DocumentsPathPrefix = "/twirp/cca.Documents/"

DocumentsPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const FilesPathPrefix = "/twirp/cca.Files/"

FilesPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const LookUpPathPrefix = "/twirp/cca.LookUp/"

LookUpPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const NewsMLDocumentsPathPrefix = "/twirp/cca.NewsMLDocuments/"

NewsMLDocumentsPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const ToolsPathPrefix = "/twirp/cca.Tools/"

ToolsPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

Variables

View Source
var (
	ProcessingStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "IN_PROGRESS",
		2: "DONE",
		3: "ERROR",
		4: "ASSET_EXISTS",
	}
	ProcessingStatus_value = map[string]int32{
		"UNKNOWN":      0,
		"IN_PROGRESS":  1,
		"DONE":         2,
		"ERROR":        3,
		"ASSET_EXISTS": 4,
	}
)

Enum value maps for ProcessingStatus.

View Source
var (
	LockingMode_name = map[int32]string{
		0: "NONE",
		1: "OPTIMISTIC_LOCKING",
		2: "PESSIMISTIC_LOCKING",
	}
	LockingMode_value = map[string]int32{
		"NONE":                0,
		"OPTIMISTIC_LOCKING":  1,
		"PESSIMISTIC_LOCKING": 2,
	}
)

Enum value maps for LockingMode.

View Source
var (
	DownloadType_name = map[int32]string{
		0: "TYPE_UNKNOWN",
		1: "TYPE_ORIGINAL",
		2: "TYPE_PRESENTATION",
	}
	DownloadType_value = map[string]int32{
		"TYPE_UNKNOWN":      0,
		"TYPE_ORIGINAL":     1,
		"TYPE_PRESENTATION": 2,
	}
)

Enum value maps for DownloadType.

View Source
var File_rpc_cca_service_proto protoreflect.FileDescriptor

Functions

func WriteError

func WriteError(resp http.ResponseWriter, err error)

WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)

Types

type Artifact

type Artifact struct {
	Type     string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	MimeType string `protobuf:"bytes,3,opt,name=mimeType,proto3" json:"mimeType,omitempty"`
	Value    string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Artifact) Descriptor deprecated

func (*Artifact) Descriptor() ([]byte, []int)

Deprecated: Use Artifact.ProtoReflect.Descriptor instead.

func (*Artifact) GetMimeType

func (x *Artifact) GetMimeType() string

func (*Artifact) GetName

func (x *Artifact) GetName() string

func (*Artifact) GetType

func (x *Artifact) GetType() string

func (*Artifact) GetValue

func (x *Artifact) GetValue() string

func (*Artifact) ProtoMessage

func (*Artifact) ProtoMessage()

func (*Artifact) ProtoReflect

func (x *Artifact) ProtoReflect() protoreflect.Message

func (*Artifact) Reset

func (x *Artifact) Reset()

func (*Artifact) String

func (x *Artifact) String() string

type ConvertToDocumentReq

type ConvertToDocumentReq struct {
	Newsml string `protobuf:"bytes,1,opt,name=newsml,proto3" json:"newsml,omitempty"` // required Full XML NewsML based document
	// contains filtered or unexported fields
}

func (*ConvertToDocumentReq) Descriptor deprecated

func (*ConvertToDocumentReq) Descriptor() ([]byte, []int)

Deprecated: Use ConvertToDocumentReq.ProtoReflect.Descriptor instead.

func (*ConvertToDocumentReq) GetNewsml

func (x *ConvertToDocumentReq) GetNewsml() string

func (*ConvertToDocumentReq) ProtoMessage

func (*ConvertToDocumentReq) ProtoMessage()

func (*ConvertToDocumentReq) ProtoReflect

func (x *ConvertToDocumentReq) ProtoReflect() protoreflect.Message

func (*ConvertToDocumentReq) Reset

func (x *ConvertToDocumentReq) Reset()

func (*ConvertToDocumentReq) String

func (x *ConvertToDocumentReq) String() string

type ConvertToDocumentRes

type ConvertToDocumentRes struct {
	Document *rpc.Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
	// contains filtered or unexported fields
}

func (*ConvertToDocumentRes) Descriptor deprecated

func (*ConvertToDocumentRes) Descriptor() ([]byte, []int)

Deprecated: Use ConvertToDocumentRes.ProtoReflect.Descriptor instead.

func (*ConvertToDocumentRes) GetDocument

func (x *ConvertToDocumentRes) GetDocument() *rpc.Document

func (*ConvertToDocumentRes) ProtoMessage

func (*ConvertToDocumentRes) ProtoMessage()

func (*ConvertToDocumentRes) ProtoReflect

func (x *ConvertToDocumentRes) ProtoReflect() protoreflect.Message

func (*ConvertToDocumentRes) Reset

func (x *ConvertToDocumentRes) Reset()

func (*ConvertToDocumentRes) String

func (x *ConvertToDocumentRes) String() string

type ConvertToNewsmlReq

type ConvertToNewsmlReq struct {
	Document *rpc.Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` // required A Naviga Doc in JSON
	// contains filtered or unexported fields
}

func (*ConvertToNewsmlReq) Descriptor deprecated

func (*ConvertToNewsmlReq) Descriptor() ([]byte, []int)

Deprecated: Use ConvertToNewsmlReq.ProtoReflect.Descriptor instead.

func (*ConvertToNewsmlReq) GetDocument

func (x *ConvertToNewsmlReq) GetDocument() *rpc.Document

func (*ConvertToNewsmlReq) ProtoMessage

func (*ConvertToNewsmlReq) ProtoMessage()

func (*ConvertToNewsmlReq) ProtoReflect

func (x *ConvertToNewsmlReq) ProtoReflect() protoreflect.Message

func (*ConvertToNewsmlReq) Reset

func (x *ConvertToNewsmlReq) Reset()

func (*ConvertToNewsmlReq) String

func (x *ConvertToNewsmlReq) String() string

type ConvertToNewsmlRes

type ConvertToNewsmlRes struct {
	Newsml string `protobuf:"bytes,1,opt,name=newsml,proto3" json:"newsml,omitempty"` // Document as NewsML
	// contains filtered or unexported fields
}

func (*ConvertToNewsmlRes) Descriptor deprecated

func (*ConvertToNewsmlRes) Descriptor() ([]byte, []int)

Deprecated: Use ConvertToNewsmlRes.ProtoReflect.Descriptor instead.

func (*ConvertToNewsmlRes) GetNewsml

func (x *ConvertToNewsmlRes) GetNewsml() string

func (*ConvertToNewsmlRes) ProtoMessage

func (*ConvertToNewsmlRes) ProtoMessage()

func (*ConvertToNewsmlRes) ProtoReflect

func (x *ConvertToNewsmlRes) ProtoReflect() protoreflect.Message

func (*ConvertToNewsmlRes) Reset

func (x *ConvertToNewsmlRes) Reset()

func (*ConvertToNewsmlRes) String

func (x *ConvertToNewsmlRes) String() string

type CreateDownloadReq

type CreateDownloadReq struct {
	UUID       string       `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`                        // required UUID of document
	Type       DownloadType `protobuf:"varint,2,opt,name=type,proto3,enum=cca.DownloadType" json:"type,omitempty"` // optional with value 'original' or 'presentation', see DownloadType enum
	Repository string       `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"`            // The repository we're downloading from, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*CreateDownloadReq) Descriptor deprecated

func (*CreateDownloadReq) Descriptor() ([]byte, []int)

Deprecated: Use CreateDownloadReq.ProtoReflect.Descriptor instead.

func (*CreateDownloadReq) GetRepository

func (x *CreateDownloadReq) GetRepository() string

func (*CreateDownloadReq) GetType

func (x *CreateDownloadReq) GetType() DownloadType

func (*CreateDownloadReq) GetUUID

func (x *CreateDownloadReq) GetUUID() string

func (*CreateDownloadReq) ProtoMessage

func (*CreateDownloadReq) ProtoMessage()

func (*CreateDownloadReq) ProtoReflect

func (x *CreateDownloadReq) ProtoReflect() protoreflect.Message

func (*CreateDownloadReq) Reset

func (x *CreateDownloadReq) Reset()

func (*CreateDownloadReq) String

func (x *CreateDownloadReq) String() string

type CreateDownloadRes

type CreateDownloadRes struct {
	DownloadId string    `protobuf:"bytes,1,opt,name=downloadId,proto3" json:"downloadId,omitempty"`
	Manifest   *Manifest `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"` // optional, used when type is supplied in CreateDownloadReq
	// contains filtered or unexported fields
}

func (*CreateDownloadRes) Descriptor deprecated

func (*CreateDownloadRes) Descriptor() ([]byte, []int)

Deprecated: Use CreateDownloadRes.ProtoReflect.Descriptor instead.

func (*CreateDownloadRes) GetDownloadId

func (x *CreateDownloadRes) GetDownloadId() string

func (*CreateDownloadRes) GetManifest

func (x *CreateDownloadRes) GetManifest() *Manifest

func (*CreateDownloadRes) ProtoMessage

func (*CreateDownloadRes) ProtoMessage()

func (*CreateDownloadRes) ProtoReflect

func (x *CreateDownloadRes) ProtoReflect() protoreflect.Message

func (*CreateDownloadRes) Reset

func (x *CreateDownloadRes) Reset()

func (*CreateDownloadRes) String

func (x *CreateDownloadRes) String() string

type CreateUploadReq

type CreateUploadReq struct {
	Filename   string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	Unit       string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"`
	Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"` // The repository we're uploading to, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*CreateUploadReq) Descriptor deprecated

func (*CreateUploadReq) Descriptor() ([]byte, []int)

Deprecated: Use CreateUploadReq.ProtoReflect.Descriptor instead.

func (*CreateUploadReq) GetFilename

func (x *CreateUploadReq) GetFilename() string

func (*CreateUploadReq) GetRepository

func (x *CreateUploadReq) GetRepository() string

func (*CreateUploadReq) GetUnit

func (x *CreateUploadReq) GetUnit() string

func (*CreateUploadReq) ProtoMessage

func (*CreateUploadReq) ProtoMessage()

func (*CreateUploadReq) ProtoReflect

func (x *CreateUploadReq) ProtoReflect() protoreflect.Message

func (*CreateUploadReq) Reset

func (x *CreateUploadReq) Reset()

func (*CreateUploadReq) String

func (x *CreateUploadReq) String() string

type CreateUploadRes

type CreateUploadRes struct {
	UploadId  string `protobuf:"bytes,1,opt,name=uploadId,proto3" json:"uploadId,omitempty"`
	UploadUrl string `protobuf:"bytes,2,opt,name=uploadUrl,proto3" json:"uploadUrl,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUploadRes) Descriptor deprecated

func (*CreateUploadRes) Descriptor() ([]byte, []int)

Deprecated: Use CreateUploadRes.ProtoReflect.Descriptor instead.

func (*CreateUploadRes) GetUploadId

func (x *CreateUploadRes) GetUploadId() string

func (*CreateUploadRes) GetUploadUrl

func (x *CreateUploadRes) GetUploadUrl() string

func (*CreateUploadRes) ProtoMessage

func (*CreateUploadRes) ProtoMessage()

func (*CreateUploadRes) ProtoReflect

func (x *CreateUploadRes) ProtoReflect() protoreflect.Message

func (*CreateUploadRes) Reset

func (x *CreateUploadRes) Reset()

func (*CreateUploadRes) String

func (x *CreateUploadRes) String() string

type CreateViewReq

type CreateViewReq struct {
	UUID       string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`             // required Document UUID
	Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"` // The repository we're reading from, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*CreateViewReq) Descriptor deprecated

func (*CreateViewReq) Descriptor() ([]byte, []int)

Deprecated: Use CreateViewReq.ProtoReflect.Descriptor instead.

func (*CreateViewReq) GetRepository

func (x *CreateViewReq) GetRepository() string

func (*CreateViewReq) GetUUID

func (x *CreateViewReq) GetUUID() string

func (*CreateViewReq) ProtoMessage

func (*CreateViewReq) ProtoMessage()

func (*CreateViewReq) ProtoReflect

func (x *CreateViewReq) ProtoReflect() protoreflect.Message

func (*CreateViewReq) Reset

func (x *CreateViewReq) Reset()

func (*CreateViewReq) String

func (x *CreateViewReq) String() string

type CreateViewRes

type CreateViewRes struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateViewRes) Descriptor deprecated

func (*CreateViewRes) Descriptor() ([]byte, []int)

Deprecated: Use CreateViewRes.ProtoReflect.Descriptor instead.

func (*CreateViewRes) GetUrl

func (x *CreateViewRes) GetUrl() string

func (*CreateViewRes) ProtoMessage

func (*CreateViewRes) ProtoMessage()

func (*CreateViewRes) ProtoReflect

func (x *CreateViewRes) ProtoReflect() protoreflect.Message

func (*CreateViewRes) Reset

func (x *CreateViewRes) Reset()

func (*CreateViewRes) String

func (x *CreateViewRes) String() string

type DeleteDocumentReq

type DeleteDocumentReq struct {
	UUID       string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`             // required The UUID of the document that will be removed
	Unit       string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"`             // required Under which unit are you performing this action
	Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"` // The repository we're deleting from, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*DeleteDocumentReq) Descriptor deprecated

func (*DeleteDocumentReq) Descriptor() ([]byte, []int)

Deprecated: Use DeleteDocumentReq.ProtoReflect.Descriptor instead.

func (*DeleteDocumentReq) GetRepository

func (x *DeleteDocumentReq) GetRepository() string

func (*DeleteDocumentReq) GetUUID

func (x *DeleteDocumentReq) GetUUID() string

func (*DeleteDocumentReq) GetUnit

func (x *DeleteDocumentReq) GetUnit() string

func (*DeleteDocumentReq) ProtoMessage

func (*DeleteDocumentReq) ProtoMessage()

func (*DeleteDocumentReq) ProtoReflect

func (x *DeleteDocumentReq) ProtoReflect() protoreflect.Message

func (*DeleteDocumentReq) Reset

func (x *DeleteDocumentReq) Reset()

func (*DeleteDocumentReq) String

func (x *DeleteDocumentReq) String() string

type DeleteDocumentRes

type DeleteDocumentRes struct {
	Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteDocumentRes) Descriptor deprecated

func (*DeleteDocumentRes) Descriptor() ([]byte, []int)

Deprecated: Use DeleteDocumentRes.ProtoReflect.Descriptor instead.

func (*DeleteDocumentRes) GetDeleted

func (x *DeleteDocumentRes) GetDeleted() bool

func (*DeleteDocumentRes) ProtoMessage

func (*DeleteDocumentRes) ProtoMessage()

func (*DeleteDocumentRes) ProtoReflect

func (x *DeleteDocumentRes) ProtoReflect() protoreflect.Message

func (*DeleteDocumentRes) Reset

func (x *DeleteDocumentRes) Reset()

func (*DeleteDocumentRes) String

func (x *DeleteDocumentRes) String() string

type DocumentExistsReq

type DocumentExistsReq struct {
	UUID       string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`             // required UUID of the document
	Unit       string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"`             // required Under which unit are you performing this action
	Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"` // The repository we're performing the check against, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*DocumentExistsReq) Descriptor deprecated

func (*DocumentExistsReq) Descriptor() ([]byte, []int)

Deprecated: Use DocumentExistsReq.ProtoReflect.Descriptor instead.

func (*DocumentExistsReq) GetRepository

func (x *DocumentExistsReq) GetRepository() string

func (*DocumentExistsReq) GetUUID

func (x *DocumentExistsReq) GetUUID() string

func (*DocumentExistsReq) GetUnit

func (x *DocumentExistsReq) GetUnit() string

func (*DocumentExistsReq) ProtoMessage

func (*DocumentExistsReq) ProtoMessage()

func (*DocumentExistsReq) ProtoReflect

func (x *DocumentExistsReq) ProtoReflect() protoreflect.Message

func (*DocumentExistsReq) Reset

func (x *DocumentExistsReq) Reset()

func (*DocumentExistsReq) String

func (x *DocumentExistsReq) String() string

type DocumentExistsRes

type DocumentExistsRes struct {
	Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
	// contains filtered or unexported fields
}

func (*DocumentExistsRes) Descriptor deprecated

func (*DocumentExistsRes) Descriptor() ([]byte, []int)

Deprecated: Use DocumentExistsRes.ProtoReflect.Descriptor instead.

func (*DocumentExistsRes) GetExists

func (x *DocumentExistsRes) GetExists() bool

func (*DocumentExistsRes) ProtoMessage

func (*DocumentExistsRes) ProtoMessage()

func (*DocumentExistsRes) ProtoReflect

func (x *DocumentExistsRes) ProtoReflect() protoreflect.Message

func (*DocumentExistsRes) Reset

func (x *DocumentExistsRes) Reset()

func (*DocumentExistsRes) String

func (x *DocumentExistsRes) String() string

type Documents

type Documents interface {
	//
	// WriteDocument is the method you would want to use when creating or updating documents.
	//
	// The method also contains functionality to handle optimistic locking. To use this you need to pass lockingMode and expectedRevision parameters.
	WriteDocument(context.Context, *WriteDocumentReq) (*WriteDocumentRes, error)

	// DeleteDocument deletes a document from repository.
	DeleteDocument(context.Context, *DeleteDocumentReq) (*DeleteDocumentRes, error)

	// Get document retreives a document from content repo
	GetDocument(context.Context, *GetDocumentReq) (*GetDocumentRes, error)

	// Method to check weather a document exists, Is cheaper to use than GetDocument
	DocumentExists(context.Context, *DocumentExistsReq) (*DocumentExistsRes, error)
}

Document service is at your service when managing documents

In this documentation when we reference to naviga.Document or Document we ha refering to [Naviga Doc Format](https://app.gitbook.com/@infomaker/s/document-format-v2/)

func NewDocumentsJSONClient

func NewDocumentsJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Documents

NewDocumentsJSONClient creates a JSON client that implements the Documents interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewDocumentsProtobufClient

func NewDocumentsProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Documents

NewDocumentsProtobufClient creates a Protobuf client that implements the Documents interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type DownloadType

type DownloadType int32

DownloadType can be passed as a parameter when downloading assets

const (
	DownloadType_TYPE_UNKNOWN      DownloadType = 0
	DownloadType_TYPE_ORIGINAL     DownloadType = 1
	DownloadType_TYPE_PRESENTATION DownloadType = 2
)

func (DownloadType) Descriptor

func (DownloadType) Enum

func (x DownloadType) Enum() *DownloadType

func (DownloadType) EnumDescriptor deprecated

func (DownloadType) EnumDescriptor() ([]byte, []int)

Deprecated: Use DownloadType.Descriptor instead.

func (DownloadType) Number

func (DownloadType) String

func (x DownloadType) String() string

func (DownloadType) Type

type ExternalUuidsHit

type ExternalUuidsHit struct {
	Uuid            string        `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`                       // uuid of the document
	ExternalUUID    string        `protobuf:"bytes,2,opt,name=externalUUID,proto3" json:"externalUUID,omitempty"`       // the external UUID property value
	ExternalURI     string        `protobuf:"bytes,3,opt,name=externalURI,proto3" json:"externalURI,omitempty"`         // the external URI property value
	ExternalVersion string        `protobuf:"bytes,4,opt,name=externalVersion,proto3" json:"externalVersion,omitempty"` // the external version property value
	Document        *rpc.Document `protobuf:"bytes,5,opt,name=document,proto3" json:"document,omitempty"`               // full Naviga document
	Error           string        `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`                     // if an error occurs fetching the document the error message
	// contains filtered or unexported fields
}

func (*ExternalUuidsHit) Descriptor deprecated

func (*ExternalUuidsHit) Descriptor() ([]byte, []int)

Deprecated: Use ExternalUuidsHit.ProtoReflect.Descriptor instead.

func (*ExternalUuidsHit) GetDocument

func (x *ExternalUuidsHit) GetDocument() *rpc.Document

func (*ExternalUuidsHit) GetError

func (x *ExternalUuidsHit) GetError() string

func (*ExternalUuidsHit) GetExternalURI

func (x *ExternalUuidsHit) GetExternalURI() string

func (*ExternalUuidsHit) GetExternalUUID

func (x *ExternalUuidsHit) GetExternalUUID() string

func (*ExternalUuidsHit) GetExternalVersion

func (x *ExternalUuidsHit) GetExternalVersion() string

func (*ExternalUuidsHit) GetUuid

func (x *ExternalUuidsHit) GetUuid() string

func (*ExternalUuidsHit) ProtoMessage

func (*ExternalUuidsHit) ProtoMessage()

func (*ExternalUuidsHit) ProtoReflect

func (x *ExternalUuidsHit) ProtoReflect() protoreflect.Message

func (*ExternalUuidsHit) Reset

func (x *ExternalUuidsHit) Reset()

func (*ExternalUuidsHit) String

func (x *ExternalUuidsHit) String() string

type ExternalUuidsReq

type ExternalUuidsReq struct {
	ExternalUuids   []string `protobuf:"bytes,1,rep,name=externalUuids,proto3" json:"externalUuids,omitempty"`      // list of UUIDs to lookup documents with ExternalUUIU property
	Start           int64    `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"`                     // an offset of the result set
	Limit           int64    `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`                     // the maximum number of hits in the response
	IncludeDocument bool     `protobuf:"varint,4,opt,name=includeDocument,proto3" json:"includeDocument,omitempty"` // if documents should be included in result
	Repository      string   `protobuf:"bytes,5,opt,name=repository,proto3" json:"repository,omitempty"`            // The repository doing the lookup against, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*ExternalUuidsReq) Descriptor deprecated

func (*ExternalUuidsReq) Descriptor() ([]byte, []int)

Deprecated: Use ExternalUuidsReq.ProtoReflect.Descriptor instead.

func (*ExternalUuidsReq) GetExternalUuids

func (x *ExternalUuidsReq) GetExternalUuids() []string

func (*ExternalUuidsReq) GetIncludeDocument

func (x *ExternalUuidsReq) GetIncludeDocument() bool

func (*ExternalUuidsReq) GetLimit

func (x *ExternalUuidsReq) GetLimit() int64

func (*ExternalUuidsReq) GetRepository

func (x *ExternalUuidsReq) GetRepository() string

func (*ExternalUuidsReq) GetStart

func (x *ExternalUuidsReq) GetStart() int64

func (*ExternalUuidsReq) ProtoMessage

func (*ExternalUuidsReq) ProtoMessage()

func (*ExternalUuidsReq) ProtoReflect

func (x *ExternalUuidsReq) ProtoReflect() protoreflect.Message

func (*ExternalUuidsReq) Reset

func (x *ExternalUuidsReq) Reset()

func (*ExternalUuidsReq) String

func (x *ExternalUuidsReq) String() string

type ExternalUuidsRes

type ExternalUuidsRes struct {
	IncludedHits int64               `protobuf:"varint,1,opt,name=includedHits,proto3" json:"includedHits,omitempty"` // the number of hits in the response
	TotalHits    int64               `protobuf:"varint,2,opt,name=totalHits,proto3" json:"totalHits,omitempty"`       // the total number of hits
	Hits         []*ExternalUuidsHit `protobuf:"bytes,3,rep,name=hits,proto3" json:"hits,omitempty"`                  // list with the included hits in the response
	// contains filtered or unexported fields
}

func (*ExternalUuidsRes) Descriptor deprecated

func (*ExternalUuidsRes) Descriptor() ([]byte, []int)

Deprecated: Use ExternalUuidsRes.ProtoReflect.Descriptor instead.

func (*ExternalUuidsRes) GetHits

func (x *ExternalUuidsRes) GetHits() []*ExternalUuidsHit

func (*ExternalUuidsRes) GetIncludedHits

func (x *ExternalUuidsRes) GetIncludedHits() int64

func (*ExternalUuidsRes) GetTotalHits

func (x *ExternalUuidsRes) GetTotalHits() int64

func (*ExternalUuidsRes) ProtoMessage

func (*ExternalUuidsRes) ProtoMessage()

func (*ExternalUuidsRes) ProtoReflect

func (x *ExternalUuidsRes) ProtoReflect() protoreflect.Message

func (*ExternalUuidsRes) Reset

func (x *ExternalUuidsRes) Reset()

func (*ExternalUuidsRes) String

func (x *ExternalUuidsRes) String() string

type FeatureFlag

type FeatureFlag struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*FeatureFlag) Descriptor deprecated

func (*FeatureFlag) Descriptor() ([]byte, []int)

Deprecated: Use FeatureFlag.ProtoReflect.Descriptor instead.

func (*FeatureFlag) GetName

func (x *FeatureFlag) GetName() string

func (*FeatureFlag) GetValue

func (x *FeatureFlag) GetValue() string

func (*FeatureFlag) ProtoMessage

func (*FeatureFlag) ProtoMessage()

func (*FeatureFlag) ProtoReflect

func (x *FeatureFlag) ProtoReflect() protoreflect.Message

func (*FeatureFlag) Reset

func (x *FeatureFlag) Reset()

func (*FeatureFlag) String

func (x *FeatureFlag) String() string

type Files

type Files interface {
	// Method to call at an interval to check status of an ongoing upload
	GetStatus(context.Context, *GetStatusReq) (*GetStatusRes, error)

	// Method returns content (as base64 encoded) from artifact file.
	GetArtifact(context.Context, *GetArtifactReq) (*GetArtifactRes, error)

	// Initiate a new upload.
	CreateUpload(context.Context, *CreateUploadReq) (*CreateUploadRes, error)

	// Initiate a new download
	CreateDownload(context.Context, *CreateDownloadReq) (*CreateDownloadRes, error)

	// Method to call at an interval to check status of downloadable image
	GetDownloadStatus(context.Context, *GetDownloadStatusReq) (*GetDownloadStatusRes, error)

	// Method to view
	CreateView(context.Context, *CreateViewReq) (*CreateViewRes, error)
}

Files service should be used primarily when uploading or downloading files.

func NewFilesJSONClient

func NewFilesJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Files

NewFilesJSONClient creates a JSON client that implements the Files interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewFilesProtobufClient

func NewFilesProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Files

NewFilesProtobufClient creates a Protobuf client that implements the Files interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type GetArtifactReq

type GetArtifactReq struct {
	UploadId string `protobuf:"bytes,1,opt,name=uploadId,proto3" json:"uploadId,omitempty"` // required The uploadid (Received when an upload is started)
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`         // required Name of the file
	// contains filtered or unexported fields
}

func (*GetArtifactReq) Descriptor deprecated

func (*GetArtifactReq) Descriptor() ([]byte, []int)

Deprecated: Use GetArtifactReq.ProtoReflect.Descriptor instead.

func (*GetArtifactReq) GetName

func (x *GetArtifactReq) GetName() string

func (*GetArtifactReq) GetUploadId

func (x *GetArtifactReq) GetUploadId() string

func (*GetArtifactReq) ProtoMessage

func (*GetArtifactReq) ProtoMessage()

func (*GetArtifactReq) ProtoReflect

func (x *GetArtifactReq) ProtoReflect() protoreflect.Message

func (*GetArtifactReq) Reset

func (x *GetArtifactReq) Reset()

func (*GetArtifactReq) String

func (x *GetArtifactReq) String() string

type GetArtifactRes

type GetArtifactRes struct {
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // Content as a BASE64 encoded string
	// contains filtered or unexported fields
}

func (*GetArtifactRes) Descriptor deprecated

func (*GetArtifactRes) Descriptor() ([]byte, []int)

Deprecated: Use GetArtifactRes.ProtoReflect.Descriptor instead.

func (*GetArtifactRes) GetContent

func (x *GetArtifactRes) GetContent() []byte

func (*GetArtifactRes) ProtoMessage

func (*GetArtifactRes) ProtoMessage()

func (*GetArtifactRes) ProtoReflect

func (x *GetArtifactRes) ProtoReflect() protoreflect.Message

func (*GetArtifactRes) Reset

func (x *GetArtifactRes) Reset()

func (*GetArtifactRes) String

func (x *GetArtifactRes) String() string

type GetDocumentReq

type GetDocumentReq struct {
	UUID       string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"` // required Document UUID
	Version    int64  `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"` // The repository we're reading from, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*GetDocumentReq) Descriptor deprecated

func (*GetDocumentReq) Descriptor() ([]byte, []int)

Deprecated: Use GetDocumentReq.ProtoReflect.Descriptor instead.

func (*GetDocumentReq) GetRepository

func (x *GetDocumentReq) GetRepository() string

func (*GetDocumentReq) GetUUID

func (x *GetDocumentReq) GetUUID() string

func (*GetDocumentReq) GetVersion

func (x *GetDocumentReq) GetVersion() int64

func (*GetDocumentReq) ProtoMessage

func (*GetDocumentReq) ProtoMessage()

func (*GetDocumentReq) ProtoReflect

func (x *GetDocumentReq) ProtoReflect() protoreflect.Message

func (*GetDocumentReq) Reset

func (x *GetDocumentReq) Reset()

func (*GetDocumentReq) String

func (x *GetDocumentReq) String() string

type GetDocumentRes

type GetDocumentRes struct {
	Document *rpc.Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` // required
	Revision string        `protobuf:"bytes,4,opt,name=revision,proto3" json:"revision,omitempty"`
	Version  int64         `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDocumentRes) Descriptor deprecated

func (*GetDocumentRes) Descriptor() ([]byte, []int)

Deprecated: Use GetDocumentRes.ProtoReflect.Descriptor instead.

func (*GetDocumentRes) GetDocument

func (x *GetDocumentRes) GetDocument() *rpc.Document

func (*GetDocumentRes) GetRevision

func (x *GetDocumentRes) GetRevision() string

func (*GetDocumentRes) GetVersion

func (x *GetDocumentRes) GetVersion() int64

func (*GetDocumentRes) ProtoMessage

func (*GetDocumentRes) ProtoMessage()

func (*GetDocumentRes) ProtoReflect

func (x *GetDocumentRes) ProtoReflect() protoreflect.Message

func (*GetDocumentRes) Reset

func (x *GetDocumentRes) Reset()

func (*GetDocumentRes) String

func (x *GetDocumentRes) String() string

type GetDownloadStatusReq

type GetDownloadStatusReq struct {
	DownloadId string `protobuf:"bytes,1,opt,name=downloadId,proto3" json:"downloadId,omitempty"` // required ID of the requested download
	// contains filtered or unexported fields
}

func (*GetDownloadStatusReq) Descriptor deprecated

func (*GetDownloadStatusReq) Descriptor() ([]byte, []int)

Deprecated: Use GetDownloadStatusReq.ProtoReflect.Descriptor instead.

func (*GetDownloadStatusReq) GetDownloadId

func (x *GetDownloadStatusReq) GetDownloadId() string

func (*GetDownloadStatusReq) ProtoMessage

func (*GetDownloadStatusReq) ProtoMessage()

func (*GetDownloadStatusReq) ProtoReflect

func (x *GetDownloadStatusReq) ProtoReflect() protoreflect.Message

func (*GetDownloadStatusReq) Reset

func (x *GetDownloadStatusReq) Reset()

func (*GetDownloadStatusReq) String

func (x *GetDownloadStatusReq) String() string

type GetDownloadStatusRes

type GetDownloadStatusRes struct {
	Status   ProcessingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=cca.ProcessingStatus" json:"status,omitempty"`
	Manifest *Manifest        `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"`
	Message  string           `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDownloadStatusRes) Descriptor deprecated

func (*GetDownloadStatusRes) Descriptor() ([]byte, []int)

Deprecated: Use GetDownloadStatusRes.ProtoReflect.Descriptor instead.

func (*GetDownloadStatusRes) GetManifest

func (x *GetDownloadStatusRes) GetManifest() *Manifest

func (*GetDownloadStatusRes) GetMessage

func (x *GetDownloadStatusRes) GetMessage() string

func (*GetDownloadStatusRes) GetStatus

func (x *GetDownloadStatusRes) GetStatus() ProcessingStatus

func (*GetDownloadStatusRes) ProtoMessage

func (*GetDownloadStatusRes) ProtoMessage()

func (*GetDownloadStatusRes) ProtoReflect

func (x *GetDownloadStatusRes) ProtoReflect() protoreflect.Message

func (*GetDownloadStatusRes) Reset

func (x *GetDownloadStatusRes) Reset()

func (*GetDownloadStatusRes) String

func (x *GetDownloadStatusRes) String() string

type GetNewsMLDocumentRes

type GetNewsMLDocumentRes struct {
	Newsml     string `protobuf:"bytes,3,opt,name=newsml,proto3" json:"newsml,omitempty"` // required
	Revision   string `protobuf:"bytes,4,opt,name=revision,proto3" json:"revision,omitempty"`
	Version    int64  `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
	Repository string `protobuf:"bytes,6,opt,name=repository,proto3" json:"repository,omitempty"` // The repository we're reading from, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*GetNewsMLDocumentRes) Descriptor deprecated

func (*GetNewsMLDocumentRes) Descriptor() ([]byte, []int)

Deprecated: Use GetNewsMLDocumentRes.ProtoReflect.Descriptor instead.

func (*GetNewsMLDocumentRes) GetNewsml

func (x *GetNewsMLDocumentRes) GetNewsml() string

func (*GetNewsMLDocumentRes) GetRepository

func (x *GetNewsMLDocumentRes) GetRepository() string

func (*GetNewsMLDocumentRes) GetRevision

func (x *GetNewsMLDocumentRes) GetRevision() string

func (*GetNewsMLDocumentRes) GetVersion

func (x *GetNewsMLDocumentRes) GetVersion() int64

func (*GetNewsMLDocumentRes) ProtoMessage

func (*GetNewsMLDocumentRes) ProtoMessage()

func (*GetNewsMLDocumentRes) ProtoReflect

func (x *GetNewsMLDocumentRes) ProtoReflect() protoreflect.Message

func (*GetNewsMLDocumentRes) Reset

func (x *GetNewsMLDocumentRes) Reset()

func (*GetNewsMLDocumentRes) String

func (x *GetNewsMLDocumentRes) String() string

type GetStatusReq

type GetStatusReq struct {
	UploadId string `protobuf:"bytes,1,opt,name=uploadId,proto3" json:"uploadId,omitempty"` // required The uploadId (Received when an upload is started)
	// contains filtered or unexported fields
}

func (*GetStatusReq) Descriptor deprecated

func (*GetStatusReq) Descriptor() ([]byte, []int)

Deprecated: Use GetStatusReq.ProtoReflect.Descriptor instead.

func (*GetStatusReq) GetUploadId

func (x *GetStatusReq) GetUploadId() string

func (*GetStatusReq) ProtoMessage

func (*GetStatusReq) ProtoMessage()

func (*GetStatusReq) ProtoReflect

func (x *GetStatusReq) ProtoReflect() protoreflect.Message

func (*GetStatusReq) Reset

func (x *GetStatusReq) Reset()

func (*GetStatusReq) String

func (x *GetStatusReq) String() string

type GetStatusRes

type GetStatusRes struct {
	Status   ProcessingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=cca.ProcessingStatus" json:"status,omitempty"` // Current status of upload (See "enums")
	Manifest *Manifest        `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"`
	Message  string           `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*GetStatusRes) Descriptor deprecated

func (*GetStatusRes) Descriptor() ([]byte, []int)

Deprecated: Use GetStatusRes.ProtoReflect.Descriptor instead.

func (*GetStatusRes) GetManifest

func (x *GetStatusRes) GetManifest() *Manifest

func (*GetStatusRes) GetMessage

func (x *GetStatusRes) GetMessage() string

func (*GetStatusRes) GetStatus

func (x *GetStatusRes) GetStatus() ProcessingStatus

func (*GetStatusRes) ProtoMessage

func (*GetStatusRes) ProtoMessage()

func (*GetStatusRes) ProtoReflect

func (x *GetStatusRes) ProtoReflect() protoreflect.Message

func (*GetStatusRes) Reset

func (x *GetStatusRes) Reset()

func (*GetStatusRes) String

func (x *GetStatusRes) String() string

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.

HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.

type LockingMode

type LockingMode int32

Locking mode is passed as a parameter when saving documents

const (
	LockingMode_NONE                LockingMode = 0
	LockingMode_OPTIMISTIC_LOCKING  LockingMode = 1
	LockingMode_PESSIMISTIC_LOCKING LockingMode = 2
)

func (LockingMode) Descriptor

func (LockingMode) Enum

func (x LockingMode) Enum() *LockingMode

func (LockingMode) EnumDescriptor deprecated

func (LockingMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use LockingMode.Descriptor instead.

func (LockingMode) Number

func (x LockingMode) Number() protoreflect.EnumNumber

func (LockingMode) String

func (x LockingMode) String() string

func (LockingMode) Type

type LookUp

type LookUp interface {
	GetSameAsUris(context.Context, *SameAsUrisReq) (*SameAsUrisRes, error)

	GetExternalUuids(context.Context, *ExternalUuidsReq) (*ExternalUuidsRes, error)
}

func NewLookUpJSONClient

func NewLookUpJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) LookUp

NewLookUpJSONClient creates a JSON client that implements the LookUp interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewLookUpProtobufClient

func NewLookUpProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) LookUp

NewLookUpProtobufClient creates a Protobuf client that implements the LookUp interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type Manifest

type Manifest struct {
	Uuid           string      `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	HashedFilename string      `protobuf:"bytes,2,opt,name=hashedFilename,proto3" json:"hashedFilename,omitempty"`
	Error          string      `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	Uri            string      `protobuf:"bytes,4,opt,name=uri,proto3" json:"uri,omitempty"`
	ContentClass   string      `protobuf:"bytes,5,opt,name=contentClass,proto3" json:"contentClass,omitempty"`
	Artifacts      []*Artifact `protobuf:"bytes,6,rep,name=artifacts,proto3" json:"artifacts,omitempty"`
	Warning        string      `protobuf:"bytes,7,opt,name=warning,proto3" json:"warning,omitempty"`
	Unit           string      `protobuf:"bytes,8,opt,name=unit,proto3" json:"unit,omitempty"`
	Repository     string      `protobuf:"bytes,9,opt,name=repository,proto3" json:"repository,omitempty"`
	// contains filtered or unexported fields
}

func Upload

func Upload(
	ctx context.Context, files Files, client *http.Client, data io.Reader, size int64,
) (string, *Manifest, error)

func (*Manifest) Descriptor deprecated

func (*Manifest) Descriptor() ([]byte, []int)

Deprecated: Use Manifest.ProtoReflect.Descriptor instead.

func (*Manifest) GetArtifact

func (m *Manifest) GetArtifact(artifactType string) *Artifact

func (*Manifest) GetArtifacts

func (x *Manifest) GetArtifacts() []*Artifact

func (*Manifest) GetContentClass

func (x *Manifest) GetContentClass() string

func (*Manifest) GetError

func (x *Manifest) GetError() string

func (*Manifest) GetHashedFilename

func (x *Manifest) GetHashedFilename() string

func (*Manifest) GetRepository

func (x *Manifest) GetRepository() string

func (*Manifest) GetUnit

func (x *Manifest) GetUnit() string

func (*Manifest) GetUri

func (x *Manifest) GetUri() string

func (*Manifest) GetUuid

func (x *Manifest) GetUuid() string

func (*Manifest) GetWarning

func (x *Manifest) GetWarning() string

func (*Manifest) ProtoMessage

func (*Manifest) ProtoMessage()

func (*Manifest) ProtoReflect

func (x *Manifest) ProtoReflect() protoreflect.Message

func (*Manifest) Reset

func (x *Manifest) Reset()

func (*Manifest) String

func (x *Manifest) String() string

type NewsMLDocuments

type NewsMLDocuments interface {
	WriteNewsMLDocument(context.Context, *WriteNewsMLDocumentReq) (*WriteNewsMLDocumentRes, error)

	DeleteNewsMLDocument(context.Context, *DeleteDocumentReq) (*DeleteDocumentRes, error)

	GetNewsMLDocument(context.Context, *GetDocumentReq) (*GetNewsMLDocumentRes, error)

	NewsMLDocumentExists(context.Context, *DocumentExistsReq) (*DocumentExistsRes, error)
}

func NewNewsMLDocumentsJSONClient

func NewNewsMLDocumentsJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) NewsMLDocuments

NewNewsMLDocumentsJSONClient creates a JSON client that implements the NewsMLDocuments interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewNewsMLDocumentsProtobufClient

func NewNewsMLDocumentsProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) NewsMLDocuments

NewNewsMLDocumentsProtobufClient creates a Protobuf client that implements the NewsMLDocuments interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type ProcessingStatus

type ProcessingStatus int32
const (
	ProcessingStatus_UNKNOWN      ProcessingStatus = 0
	ProcessingStatus_IN_PROGRESS  ProcessingStatus = 1
	ProcessingStatus_DONE         ProcessingStatus = 2
	ProcessingStatus_ERROR        ProcessingStatus = 3
	ProcessingStatus_ASSET_EXISTS ProcessingStatus = 4
)

func (ProcessingStatus) Descriptor

func (ProcessingStatus) Enum

func (ProcessingStatus) EnumDescriptor deprecated

func (ProcessingStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProcessingStatus.Descriptor instead.

func (ProcessingStatus) Number

func (ProcessingStatus) String

func (x ProcessingStatus) String() string

func (ProcessingStatus) Type

type SameAsUrisHit

type SameAsUrisHit struct {
	Uuid       string        `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`             // uuid of the document
	SameAsURIs []string      `protobuf:"bytes,2,rep,name=sameAsURIs,proto3" json:"sameAsURIs,omitempty"` // list of URI for the SameAs property
	Document   *rpc.Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"`     // full Naviga document
	Error      string        `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`           // if an error occurs fetching the document the error message
	// contains filtered or unexported fields
}

func (*SameAsUrisHit) Descriptor deprecated

func (*SameAsUrisHit) Descriptor() ([]byte, []int)

Deprecated: Use SameAsUrisHit.ProtoReflect.Descriptor instead.

func (*SameAsUrisHit) GetDocument

func (x *SameAsUrisHit) GetDocument() *rpc.Document

func (*SameAsUrisHit) GetError

func (x *SameAsUrisHit) GetError() string

func (*SameAsUrisHit) GetSameAsURIs

func (x *SameAsUrisHit) GetSameAsURIs() []string

func (*SameAsUrisHit) GetUuid

func (x *SameAsUrisHit) GetUuid() string

func (*SameAsUrisHit) ProtoMessage

func (*SameAsUrisHit) ProtoMessage()

func (*SameAsUrisHit) ProtoReflect

func (x *SameAsUrisHit) ProtoReflect() protoreflect.Message

func (*SameAsUrisHit) Reset

func (x *SameAsUrisHit) Reset()

func (*SameAsUrisHit) String

func (x *SameAsUrisHit) String() string

type SameAsUrisReq

type SameAsUrisReq struct {
	SameAsUris      []string `protobuf:"bytes,1,rep,name=sameAsUris,proto3" json:"sameAsUris,omitempty"`            // list of URIs to lookup documents with SameAsURIs property
	Start           int64    `protobuf:"varint,3,opt,name=start,proto3" json:"start,omitempty"`                     // an offset of the result set
	Limit           int64    `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`                     // the maximum number of hits in the response
	IncludeDocument bool     `protobuf:"varint,5,opt,name=includeDocument,proto3" json:"includeDocument,omitempty"` // if documents should be included in result
	Repository      string   `protobuf:"bytes,6,opt,name=repository,proto3" json:"repository,omitempty"`            // The repository doing the lookup against, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*SameAsUrisReq) Descriptor deprecated

func (*SameAsUrisReq) Descriptor() ([]byte, []int)

Deprecated: Use SameAsUrisReq.ProtoReflect.Descriptor instead.

func (*SameAsUrisReq) GetIncludeDocument

func (x *SameAsUrisReq) GetIncludeDocument() bool

func (*SameAsUrisReq) GetLimit

func (x *SameAsUrisReq) GetLimit() int64

func (*SameAsUrisReq) GetRepository

func (x *SameAsUrisReq) GetRepository() string

func (*SameAsUrisReq) GetSameAsUris

func (x *SameAsUrisReq) GetSameAsUris() []string

func (*SameAsUrisReq) GetStart

func (x *SameAsUrisReq) GetStart() int64

func (*SameAsUrisReq) ProtoMessage

func (*SameAsUrisReq) ProtoMessage()

func (*SameAsUrisReq) ProtoReflect

func (x *SameAsUrisReq) ProtoReflect() protoreflect.Message

func (*SameAsUrisReq) Reset

func (x *SameAsUrisReq) Reset()

func (*SameAsUrisReq) String

func (x *SameAsUrisReq) String() string

type SameAsUrisRes

type SameAsUrisRes struct {
	IncludedHits int64            `protobuf:"varint,1,opt,name=includedHits,proto3" json:"includedHits,omitempty"` // the number of hits in the response
	TotalHits    int64            `protobuf:"varint,2,opt,name=totalHits,proto3" json:"totalHits,omitempty"`       // the total number of hits
	Hits         []*SameAsUrisHit `protobuf:"bytes,3,rep,name=hits,proto3" json:"hits,omitempty"`                  // list with the included hits in the response
	// contains filtered or unexported fields
}

func (*SameAsUrisRes) Descriptor deprecated

func (*SameAsUrisRes) Descriptor() ([]byte, []int)

Deprecated: Use SameAsUrisRes.ProtoReflect.Descriptor instead.

func (*SameAsUrisRes) GetHits

func (x *SameAsUrisRes) GetHits() []*SameAsUrisHit

func (*SameAsUrisRes) GetIncludedHits

func (x *SameAsUrisRes) GetIncludedHits() int64

func (*SameAsUrisRes) GetTotalHits

func (x *SameAsUrisRes) GetTotalHits() int64

func (*SameAsUrisRes) ProtoMessage

func (*SameAsUrisRes) ProtoMessage()

func (*SameAsUrisRes) ProtoReflect

func (x *SameAsUrisRes) ProtoReflect() protoreflect.Message

func (*SameAsUrisRes) Reset

func (x *SameAsUrisRes) Reset()

func (*SameAsUrisRes) String

func (x *SameAsUrisRes) String() string

type Tools

type Tools interface {
	// Method to convert NewsML to Document
	ConvertToDocument(context.Context, *ConvertToDocumentReq) (*ConvertToDocumentRes, error)

	// Convert Document to NewsML
	ConvertToNewsml(context.Context, *ConvertToNewsmlReq) (*ConvertToNewsmlRes, error)

	// Validate NavigaDoc document JSON against JSON schema
	ValidateNavigaDoc(context.Context, *ValidateDocumentReq) (*ValidateDocumentRes, error)
}

Tools service exposes some "tool"-like methods

func NewToolsJSONClient

func NewToolsJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Tools

NewToolsJSONClient creates a JSON client that implements the Tools interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewToolsProtobufClient

func NewToolsProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Tools

NewToolsProtobufClient creates a Protobuf client that implements the Tools interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type TwirpServer

type TwirpServer interface {
	http.Handler

	// ServiceDescriptor returns gzipped bytes describing the .proto file that
	// this service was generated from. Once unzipped, the bytes can be
	// unmarshalled as a
	// google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto.
	//
	// The returned integer is the index of this particular service within that
	// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
	// low-level field, expected to be used for reflection.
	ServiceDescriptor() ([]byte, int)

	// ProtocGenTwirpVersion is the semantic version string of the version of
	// twirp used to generate this file.
	ProtocGenTwirpVersion() string

	// PathPrefix returns the HTTP URL path prefix for all methods handled by this
	// service. This can be used with an HTTP mux to route Twirp requests.
	// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
	// that is, everything in a Twirp route except for the <Method> at the end.
	PathPrefix() string
}

TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.

func NewDocumentsServer

func NewDocumentsServer(svc Documents, opts ...interface{}) TwirpServer

NewDocumentsServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewFilesServer

func NewFilesServer(svc Files, opts ...interface{}) TwirpServer

NewFilesServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewLookUpServer

func NewLookUpServer(svc LookUp, opts ...interface{}) TwirpServer

NewLookUpServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewNewsMLDocumentsServer

func NewNewsMLDocumentsServer(svc NewsMLDocuments, opts ...interface{}) TwirpServer

NewNewsMLDocumentsServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewToolsServer

func NewToolsServer(svc Tools, opts ...interface{}) TwirpServer

NewToolsServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

type ValidateDocumentReq

type ValidateDocumentReq struct {
	Document *rpc.Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateDocumentReq) Descriptor deprecated

func (*ValidateDocumentReq) Descriptor() ([]byte, []int)

Deprecated: Use ValidateDocumentReq.ProtoReflect.Descriptor instead.

func (*ValidateDocumentReq) GetDocument

func (x *ValidateDocumentReq) GetDocument() *rpc.Document

func (*ValidateDocumentReq) ProtoMessage

func (*ValidateDocumentReq) ProtoMessage()

func (*ValidateDocumentReq) ProtoReflect

func (x *ValidateDocumentReq) ProtoReflect() protoreflect.Message

func (*ValidateDocumentReq) Reset

func (x *ValidateDocumentReq) Reset()

func (*ValidateDocumentReq) String

func (x *ValidateDocumentReq) String() string

type ValidateDocumentRes

type ValidateDocumentRes struct {
	SchemaErrors []string `protobuf:"bytes,1,rep,name=schemaErrors,proto3" json:"schemaErrors,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateDocumentRes) Descriptor deprecated

func (*ValidateDocumentRes) Descriptor() ([]byte, []int)

Deprecated: Use ValidateDocumentRes.ProtoReflect.Descriptor instead.

func (*ValidateDocumentRes) GetSchemaErrors

func (x *ValidateDocumentRes) GetSchemaErrors() []string

func (*ValidateDocumentRes) ProtoMessage

func (*ValidateDocumentRes) ProtoMessage()

func (*ValidateDocumentRes) ProtoReflect

func (x *ValidateDocumentRes) ProtoReflect() protoreflect.Message

func (*ValidateDocumentRes) Reset

func (x *ValidateDocumentRes) Reset()

func (*ValidateDocumentRes) String

func (x *ValidateDocumentRes) String() string

type WriteDocumentReq

type WriteDocumentReq struct {
	UploadId         string         `protobuf:"bytes,1,opt,name=uploadId,proto3" json:"uploadId,omitempty"`
	Unit             string         `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"`                                     // required
	Document         *rpc.Document  `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"`                             // required
	ExpectedRevision string         `protobuf:"bytes,4,opt,name=expectedRevision,proto3" json:"expectedRevision,omitempty"`             // When lockingMode is used expected revision should also be posted
	LockingMode      LockingMode    `protobuf:"varint,5,opt,name=lockingMode,proto3,enum=cca.LockingMode" json:"lockingMode,omitempty"` // Enum to enable certain locking mode when saving documents (See "Enums")
	Features         []*FeatureFlag `protobuf:"bytes,6,rep,name=features,proto3" json:"features,omitempty"`
	Repository       string         `protobuf:"bytes,7,opt,name=repository,proto3" json:"repository,omitempty"` // The repository we're writing to, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*WriteDocumentReq) Descriptor deprecated

func (*WriteDocumentReq) Descriptor() ([]byte, []int)

Deprecated: Use WriteDocumentReq.ProtoReflect.Descriptor instead.

func (*WriteDocumentReq) GetDocument

func (x *WriteDocumentReq) GetDocument() *rpc.Document

func (*WriteDocumentReq) GetExpectedRevision

func (x *WriteDocumentReq) GetExpectedRevision() string

func (*WriteDocumentReq) GetFeatures

func (x *WriteDocumentReq) GetFeatures() []*FeatureFlag

func (*WriteDocumentReq) GetLockingMode

func (x *WriteDocumentReq) GetLockingMode() LockingMode

func (*WriteDocumentReq) GetRepository

func (x *WriteDocumentReq) GetRepository() string

func (*WriteDocumentReq) GetUnit

func (x *WriteDocumentReq) GetUnit() string

func (*WriteDocumentReq) GetUploadId

func (x *WriteDocumentReq) GetUploadId() string

func (*WriteDocumentReq) ProtoMessage

func (*WriteDocumentReq) ProtoMessage()

func (*WriteDocumentReq) ProtoReflect

func (x *WriteDocumentReq) ProtoReflect() protoreflect.Message

func (*WriteDocumentReq) Reset

func (x *WriteDocumentReq) Reset()

func (*WriteDocumentReq) String

func (x *WriteDocumentReq) String() string

type WriteDocumentRes

type WriteDocumentRes struct {
	Document *rpc.Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
	Revision string        `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	Version  int64         `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteDocumentRes) Descriptor deprecated

func (*WriteDocumentRes) Descriptor() ([]byte, []int)

Deprecated: Use WriteDocumentRes.ProtoReflect.Descriptor instead.

func (*WriteDocumentRes) GetDocument

func (x *WriteDocumentRes) GetDocument() *rpc.Document

func (*WriteDocumentRes) GetRevision

func (x *WriteDocumentRes) GetRevision() string

func (*WriteDocumentRes) GetVersion

func (x *WriteDocumentRes) GetVersion() int64

func (*WriteDocumentRes) ProtoMessage

func (*WriteDocumentRes) ProtoMessage()

func (*WriteDocumentRes) ProtoReflect

func (x *WriteDocumentRes) ProtoReflect() protoreflect.Message

func (*WriteDocumentRes) Reset

func (x *WriteDocumentRes) Reset()

func (*WriteDocumentRes) String

func (x *WriteDocumentRes) String() string

type WriteNewsMLDocumentReq

type WriteNewsMLDocumentReq struct {
	UploadId         string         `protobuf:"bytes,1,opt,name=uploadId,proto3" json:"uploadId,omitempty"`
	Unit             string         `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"`     // required
	Newsml           string         `protobuf:"bytes,3,opt,name=newsml,proto3" json:"newsml,omitempty"` // required
	ExpectedRevision string         `protobuf:"bytes,4,opt,name=expectedRevision,proto3" json:"expectedRevision,omitempty"`
	LockingMode      LockingMode    `protobuf:"varint,5,opt,name=lockingMode,proto3,enum=cca.LockingMode" json:"lockingMode,omitempty"`
	Features         []*FeatureFlag `protobuf:"bytes,6,rep,name=features,proto3" json:"features,omitempty"`
	Repository       string         `protobuf:"bytes,7,opt,name=repository,proto3" json:"repository,omitempty"` // The repository we're writing to, defaults to "editorial".
	// contains filtered or unexported fields
}

func (*WriteNewsMLDocumentReq) Descriptor deprecated

func (*WriteNewsMLDocumentReq) Descriptor() ([]byte, []int)

Deprecated: Use WriteNewsMLDocumentReq.ProtoReflect.Descriptor instead.

func (*WriteNewsMLDocumentReq) GetExpectedRevision

func (x *WriteNewsMLDocumentReq) GetExpectedRevision() string

func (*WriteNewsMLDocumentReq) GetFeatures

func (x *WriteNewsMLDocumentReq) GetFeatures() []*FeatureFlag

func (*WriteNewsMLDocumentReq) GetLockingMode

func (x *WriteNewsMLDocumentReq) GetLockingMode() LockingMode

func (*WriteNewsMLDocumentReq) GetNewsml

func (x *WriteNewsMLDocumentReq) GetNewsml() string

func (*WriteNewsMLDocumentReq) GetRepository

func (x *WriteNewsMLDocumentReq) GetRepository() string

func (*WriteNewsMLDocumentReq) GetUnit

func (x *WriteNewsMLDocumentReq) GetUnit() string

func (*WriteNewsMLDocumentReq) GetUploadId

func (x *WriteNewsMLDocumentReq) GetUploadId() string

func (*WriteNewsMLDocumentReq) ProtoMessage

func (*WriteNewsMLDocumentReq) ProtoMessage()

func (*WriteNewsMLDocumentReq) ProtoReflect

func (x *WriteNewsMLDocumentReq) ProtoReflect() protoreflect.Message

func (*WriteNewsMLDocumentReq) Reset

func (x *WriteNewsMLDocumentReq) Reset()

func (*WriteNewsMLDocumentReq) String

func (x *WriteNewsMLDocumentReq) String() string

type WriteNewsMLDocumentRes

type WriteNewsMLDocumentRes struct {
	Newsml   string `protobuf:"bytes,1,opt,name=newsml,proto3" json:"newsml,omitempty"`
	Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	Version  int64  `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteNewsMLDocumentRes) Descriptor deprecated

func (*WriteNewsMLDocumentRes) Descriptor() ([]byte, []int)

Deprecated: Use WriteNewsMLDocumentRes.ProtoReflect.Descriptor instead.

func (*WriteNewsMLDocumentRes) GetNewsml

func (x *WriteNewsMLDocumentRes) GetNewsml() string

func (*WriteNewsMLDocumentRes) GetRevision

func (x *WriteNewsMLDocumentRes) GetRevision() string

func (*WriteNewsMLDocumentRes) GetVersion

func (x *WriteNewsMLDocumentRes) GetVersion() int64

func (*WriteNewsMLDocumentRes) ProtoMessage

func (*WriteNewsMLDocumentRes) ProtoMessage()

func (*WriteNewsMLDocumentRes) ProtoReflect

func (x *WriteNewsMLDocumentRes) ProtoReflect() protoreflect.Message

func (*WriteNewsMLDocumentRes) Reset

func (x *WriteNewsMLDocumentRes) Reset()

func (*WriteNewsMLDocumentRes) String

func (x *WriteNewsMLDocumentRes) String() string

Jump to

Keyboard shortcuts

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