mapper

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mapper provides functions to map between api and domain models.

Index

Constants

View Source
const (
	// TextJSON is the content type for JSON.
	TextJSON = "text/json"
	// TextYAML is the content type for YAML.
	TextYAML = "text/yaml"
	// Empty is the content type for empty.
	// Empty content type is treated as YAML by default.
	// Due to spec miss, old otel-collector sends empty content type even though it should be YAML.
	Empty = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapper

type Mapper struct{}

Mapper is a struct that provides methods to map between domain models and API models.

func New

func New() *Mapper

New creates a new instance of Mapper.

func (*Mapper) MapAgentToAPI

func (mapper *Mapper) MapAgentToAPI(agent *model.Agent) *v1agent.Agent

MapAgentToAPI maps a domain model Agent to an API model Agent.

Jump to

Keyboard shortcuts

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