github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/backend/display/options.go (about) 1 // Copyright 2016-2018, Pulumi Corporation. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package display 16 17 import ( 18 "io" 19 20 "github.com/pulumi/pulumi/pkg/v3/backend/display/internal/terminal" 21 "github.com/pulumi/pulumi/sdk/v3/go/common/diag/colors" 22 ) 23 24 // Type of output to display. 25 type Type int 26 27 const ( 28 // DisplayProgress displays an update as it progresses. 29 DisplayProgress Type = iota 30 // DisplayDiff displays a rich diff. 31 DisplayDiff 32 // DisplayQuery displays query output. 33 DisplayQuery 34 // DisplayWatch displays watch output. 35 DisplayWatch 36 ) 37 38 // Options controls how the output of events are rendered 39 type Options struct { 40 Color colors.Colorization // colorization to apply to events. 41 ShowConfig bool // true if we should show configuration information. 42 ShowReplacementSteps bool // true to show the replacement steps in the plan. 43 ShowSameResources bool // true to show the resources that aren't updated in addition to updates. 44 ShowReads bool // true to show resources that are being read in 45 TruncateOutput bool // true if we should truncate long outputs 46 SuppressOutputs bool // true to suppress output summarization, e.g. if contains sensitive info. 47 SuppressPermalink bool // true to suppress state permalink 48 SummaryDiff bool // true if diff display should be summarized. 49 IsInteractive bool // true if we should display things interactively. 50 Type Type // type of display (rich diff, progress, or query). 51 JSONDisplay bool // true if we should emit the entire diff as JSON. 52 EventLogPath string // the path to the file to use for logging events, if any. 53 Debug bool // true to enable debug output. 54 Stdin io.Reader // the reader to use for stdin. Defaults to os.Stdin if unset. 55 Stdout io.Writer // the writer to use for stdout. Defaults to os.Stdout if unset. 56 Stderr io.Writer // the writer to use for stderr. Defaults to os.Stderr if unset. 57 SuppressTimings bool // true to suppress displaying timings of resource actions 58 59 // testing-only options 60 term terminal.Terminal 61 deterministicOutput bool 62 }