raw

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package raw provides the defined raw types for Vela.

Usage:

import "github.com/go-vela/server/compiler/types/raw"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringSlice

type StringSlice []string

StringSlice represents a string or an array of strings.

func (StringSlice) JSONSchema

func (StringSlice) JSONSchema() *jsonschema.Schema

JSONSchema handles some overrides that need to be in place for this type for the jsonschema generation.

Without these changes it would only allow an array of strings, but we do some special handling to support plain string also.

func (*StringSlice) UnmarshalJSON

func (s *StringSlice) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the Unmarshaler interface for the StringSlice type.

func (*StringSlice) UnmarshalYAML

func (s *StringSlice) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaler interface for the StringSlice type.

type StringSliceMap

type StringSliceMap map[string]string

StringSliceMap represents an array of strings or a map of strings.

func (StringSliceMap) JSONSchema

func (StringSliceMap) JSONSchema() *jsonschema.Schema

JSONSchema handles some overrides that need to be in place for this type for the jsonschema generation.

Without these changes it would only allow a map of string, but we do some special handling to support array of strings.

func (*StringSliceMap) Scan

func (s *StringSliceMap) Scan(value interface{}) error

Scan decodes the JSON string into map[string]string.

func (*StringSliceMap) UnmarshalJSON

func (s *StringSliceMap) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the Unmarshaler interface for the StringSlice type.

func (*StringSliceMap) UnmarshalYAML

func (s *StringSliceMap) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaler interface for the StringSliceMap type.

func (StringSliceMap) Value

func (s StringSliceMap) Value() (driver.Value, error)

Value returns the map in JSON format.

Jump to

Keyboard shortcuts

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