Documentation
¶
Overview ¶
Package helper provides helper functions for mapping between domain models and API models.
Index ¶
- Constants
- type Mapper
- func (mapper *Mapper) MapAPIToAgent(apiAgent *v1.Agent) *model.Agent
- func (mapper *Mapper) MapAPIToAgentGroup(apiAgentGroup *v1.AgentGroup) *model.AgentGroup
- func (mapper *Mapper) MapAgentGroupToAPI(domainAgentGroup *model.AgentGroup) *v1.AgentGroup
- func (mapper *Mapper) MapAgentToAPI(agent *model.Agent) *v1.Agent
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 (*Mapper) MapAPIToAgent ¶
MapAPIToAgent maps an API model Agent to a domain model Agent.
func (*Mapper) MapAPIToAgentGroup ¶
func (mapper *Mapper) MapAPIToAgentGroup(apiAgentGroup *v1.AgentGroup) *model.AgentGroup
MapAPIToAgentGroup maps an API model AgentGroup to a domain model AgentGroup.
func (*Mapper) MapAgentGroupToAPI ¶
func (mapper *Mapper) MapAgentGroupToAPI(domainAgentGroup *model.AgentGroup) *v1.AgentGroup
MapAgentGroupToAPI maps a domain model AgentGroup to an API model AgentGroup.
Click to show internal directories.
Click to hide internal directories.