dto

package
v0.0.0-...-d46a54d Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullDTOToRule

func FullDTOToRule(r RuleDTO) (domain.Rule, error)

FullDTOToRule converts DTO to Rule with all of its fields

Types

type RuleDTO

type RuleDTO struct {
	ID             int64    `json:"id"`
	Service        string   `json:"service"`
	Priority       int64    `json:"priority"`
	MatcherRegex   []string `json:"matcher_regexes"`
	IdentityRegex  string   `json:"identity_regex"`
	Template       string   `json:"template"`
	Timeout        string   `json:"timeout_duration"`
	ResponseStatus int      `json:"response_status"`
	IsReadOnly     bool     `json:"read_only"`
}

RuleDTO is DTO for rule

func RuleToDTO

func RuleToDTO(r domain.Rule) RuleDTO

RuleToDTO converts rule to DTO without adding template

func RuleToFullDTO

func RuleToFullDTO(r domain.Rule) RuleDTO

RuleToFullDTO converts rule to DTO with all of its fields

func RulesToDTO

func RulesToDTO(rules []domain.Rule) []RuleDTO

RulesToDTO converts slice of rules to DTOs

Jump to

Keyboard shortcuts

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