clients

package
v0.0.0-...-4109721 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChunkSlice

func ChunkSlice(slice []string, chunkSize int) ([][]string, error)

func CreateMessageList

func CreateMessageList(messages []string, messagesType MessageType) (string, error)

func CreateUpdateCentralEuCatalogMessage

func CreateUpdateCentralEuCatalogMessage(operation Operation, payload string) (string, error)

func ProcessMessageList

func ProcessMessageList(messageList MessageList, fn processMessage) error

func SendAllByTopic

func SendAllByTopic(messageTopicMap map[Recipient]map[MessageType][]string, messageListSize int, from string, fn submitMessage) error

Types

type Application

type Application struct {
	ID        string `json:"application_id"`
	CatalogID string `json:"catalog_id"`
	Applicant any    `json:"form"`
}

An Application contains the data needed to apply for a permit.

type Base64String

type Base64String string

func CreateDataPermitMessage

func CreateDataPermitMessage(payload []byte) (Base64String, error)

type DataPermitMessage

type DataPermitMessage struct {
	Operation   Operation   `json:"operation"`
	Application Application `json:"application"`
}

type DatasetMessage

type DatasetMessage struct {
	Metadata      string        `json:"metadata"` // base64 encoded metadata xml
	Serialization Serialization `json:"serialization"`
}

type FairDataPointClient

type FairDataPointClient struct {
	DisableTLS bool
	Url        string
	Username   string
	// contains filtered or unexported fields
}

func (FairDataPointClient) Add

func (fairdatapointClient FairDataPointClient) Add(payload string) (*http.Response, error)

func (FairDataPointClient) Delete

func (fairdatapointClient FairDataPointClient) Delete(uuid string) (*http.Response, error)

func (FairDataPointClient) GetCatalogData

func (fairdatapointClient FairDataPointClient) GetCatalogData(uuid string) (*http.Response, error)

func (FairDataPointClient) Search

func (fairdatapointClient FairDataPointClient) Search(dcterm_identifier string) ([]byte, error)

func (FairDataPointClient) Update

func (fairdatapointClient FairDataPointClient) Update(uuid string, message string) (*http.Response, error)

type Message

type Message struct {
	Type    MessageType `json:"type"`
	Content []byte      `json:"content"`
	From    string      `json:"from"`
}

func ReadMessage

func ReadMessage(message string) (Message, error)

type MessageList

type MessageList struct {
	Type     MessageType `json:"type"`
	Messages []string    `json:"messages"`
	From     string      `json:"from"`
}

func ReadMessageList

func ReadMessageList(messageList string) (MessageList, error)

type MessageType

type MessageType string
const (
	UpdateCentralEuCatalog MessageType = "updateCentralEUCatalog"
	DataPermit             MessageType = "dataPermit"
)

type Operation

type Operation string
const (
	CreateDataset Operation = "createDataset"
	UpdateDataset Operation = "updateDataset"
	DeleteDataset Operation = "deleteDataset"
	Restore       Operation = "restore"

	ApplyPermit Operation = "applyPermit"
)

type Recipient

type Recipient string

type RequestObject

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

type SearchResponse

type SearchResponse struct {
	Uri         string   `json:"uri"`
	Types       []string `json:"types"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Relations   []string `json:"relations"`
}

type Serialization

type Serialization string
const (
	Rdf Serialization = "rdf"
)

type UpdateCentralEuCatalogMessage

type UpdateCentralEuCatalogMessage struct {
	Operation Operation `json:"operation"`
	Payload   string    `json:"payload"`
}

Jump to

Keyboard shortcuts

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