github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/legacy/helper/schema/resource_data_get_source.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package schema
     5  
     6  //go:generate go run golang.org/x/tools/cmd/stringer -type=getSource resource_data_get_source.go
     7  
     8  // getSource represents the level we want to get for a value (internally).
     9  // Any source less than or equal to the level will be loaded (whichever
    10  // has a value first).
    11  type getSource byte
    12  
    13  const (
    14  	getSourceState getSource = 1 << iota
    15  	getSourceConfig
    16  	getSourceDiff
    17  	getSourceSet
    18  	getSourceExact               // Only get from the _exact_ level
    19  	getSourceLevelMask getSource = getSourceState | getSourceConfig | getSourceDiff | getSourceSet
    20  )