yaml

package
v2.1.0-alpha11 Latest Latest
Warning

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

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

Documentation

Overview

Package yaml provides utility functions for working with YAML files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHeaders

func CompareHeaders(h1 http.Header, h2 http.Header, res *[]models.HeaderResult, noise map[string]string) bool

func Contains

func Contains(elems []string, v string) bool

func CreateYamlFile

func CreateYamlFile(ctx context.Context, Logger *zap.Logger, path string, fileName string) (bool, error)

func FindLastIndex

func FindLastIndex(path string, _ *zap.Logger) (int, error)

FindLastIndex returns the index for the new yaml file by reading the yaml file names in the given path directory

func NewSessionIndex

func NewSessionIndex(path string, Logger *zap.Logger) (string, error)

func ReadDir

func ReadDir(path string, fileMode fs.FileMode) (*os.File, error)

func ReadFile

func ReadFile(ctx context.Context, logger *zap.Logger, path, name string) ([]byte, error)

func ReadSessionIndices

func ReadSessionIndices(_ context.Context, path string, Logger *zap.Logger) ([]string, error)

func ValidatePath

func ValidatePath(path string) (string, error)

func WriteFile

func WriteFile(ctx context.Context, logger *zap.Logger, path, fileName string, docData []byte, isAppend bool) error

Types

type NetworkTrafficDoc

type NetworkTrafficDoc struct {
	Version      models.Version `json:"version" yaml:"version"`
	Kind         models.Kind    `json:"kind" yaml:"kind"`
	Name         string         `json:"name" yaml:"name"`
	Spec         yamlLib.Node   `json:"spec" yaml:"spec"`
	Curl         string         `json:"curl" yaml:"curl,omitempty"`
	ConnectionID string         `json:"connectionId" yaml:"connectionId,omitempty"`
}

NetworkTrafficDoc stores the request-response data of a network call (ingress or egress)

Directories

Path Synopsis
Package configdb provides functionality for working with keploy configuration databases.
Package configdb provides functionality for working with keploy configuration databases.
Package mockdb provides a mock database implementation.
Package mockdb provides a mock database implementation.
Package reportdb provides functionality for managing test reports in a database.
Package reportdb provides functionality for managing test reports in a database.
Package testdb provides functionality for working with test databases.
Package testdb provides functionality for working with test databases.

Jump to

Keyboard shortcuts

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