serialize

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package serialize provides YAML serialization for GitLab CI/CD pipeline types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Full

func Full(p pipeline.Pipeline, jobs []pipeline.Job) (string, error)

Full serializes a complete pipeline configuration with jobs to YAML.

func Job

func Job(j pipeline.Job) (string, error)

Job serializes a pipeline.Job to YAML.

func Pipeline

func Pipeline(p pipeline.Pipeline) (string, error)

Pipeline serializes a pipeline.Pipeline to YAML.

func StructToMap

func StructToMap(v any) (map[string]any, error)

StructToMap converts a struct to a map[string]any with snake_case keys. It omits zero-valued fields and respects the IsZero() interface.

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase converts a PascalCase or camelCase string to snake_case.

Types

type IsZeroer

type IsZeroer interface {
	IsZero() bool
}

IsZeroer is the interface for types that can report if they are zero-valued.

Jump to

Keyboard shortcuts

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