configlocations

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2021 The Skaffold Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	SourceFile  string
	StartLine   int
	StartColumn int
	EndLine     int
	EndColumn   int
}

func MissingLocation

func MissingLocation() *Location

type YAMLInfo

type YAMLInfo struct {
	RNode      *kyaml.RNode
	SourceFile string
}

type YAMLInfos

type YAMLInfos struct {
	FieldsOverrodeByProfile map[string]YAMLOverrideInfo // map of schema path -> profile name -- ex: /artifacts/0/image -> "overwrite-artifacte-image-profile"
	// contains filtered or unexported fields
}

func NewYAMLInfos

func NewYAMLInfos() *YAMLInfos

func Parse

func Parse(sourceFile string, config *latestV1.SkaffoldConfig, fieldsOverrodeByProfile map[string]YAMLOverrideInfo) (*YAMLInfos, error)

Parse parses a skaffold config entry collecting file location information for each schema config object

func (*YAMLInfos) GetYamlInfosCopy

func (m *YAMLInfos) GetYamlInfosCopy() map[uintptr]map[string]YAMLInfo

func (*YAMLInfos) Locate

func (m *YAMLInfos) Locate(obj interface{}) *Location

Locate gets the location for a skaffold schema struct pointer

func (*YAMLInfos) LocateByPointer

func (m *YAMLInfos) LocateByPointer(ptr uintptr) *Location

Locate gets the location for a skaffold schema struct pointer

func (*YAMLInfos) LocateElement

func (m *YAMLInfos) LocateElement(obj interface{}, idx int) *Location

Locate gets the location for a skaffold schema struct pointer

func (*YAMLInfos) LocateField

func (m *YAMLInfos) LocateField(obj interface{}, fieldName string) *Location

Locate gets the location for a skaffold schema struct pointer

type YAMLOverrideInfo

type YAMLOverrideInfo struct {
	ProfileName    string
	PatchIndex     int
	PatchOperation string
	PatchCopyFrom  string
}

Jump to

Keyboard shortcuts

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