github.com/lyft/flytestdlib@v0.3.12-0.20210213045714-8cdd111ecda1/cli/pflags/api/types.go (about)

     1  package api
     2  
     3  import (
     4  	"go/types"
     5  	"time"
     6  )
     7  
     8  // Determines how tests should be generated.
     9  type TestStrategy string
    10  
    11  const (
    12  	JSON        TestStrategy = "Json"
    13  	SliceJoined TestStrategy = "SliceJoined"
    14  	SliceRaw    TestStrategy = "SliceRaw"
    15  )
    16  
    17  type FieldInfo struct {
    18  	Name              string
    19  	GoName            string
    20  	Typ               types.Type
    21  	DefaultValue      string
    22  	UsageString       string
    23  	FlagMethodName    string
    24  	TestValue         string
    25  	TestStrategy      TestStrategy
    26  	ShouldBindDefault bool
    27  }
    28  
    29  // Holds the finalized information passed to the template for evaluation.
    30  type TypeInfo struct {
    31  	Timestamp time.Time
    32  	Fields    []FieldInfo
    33  	Package   string
    34  	Name      string
    35  	TypeRef   string
    36  	Imports   map[string]string
    37  }