Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DeclarationMap = mergeMap( activations.DeclarationMap, assets.DeclarationMap, configurations.DeclarationMap, management.DeclarationMap, )
DeclarationMap is a mapping of Declaration Type to the Go type
View Source
var ErrUnknownDeclarationType = errors.New("unknown declaration type")
Functions ¶
func GenerateFromGit ¶
func GenerateFromGit(repoURL, commit, path string, reps replace.Replacements, output string) error
GenerateFromGit generates Go types from the declarative schema at the git repo/commit/path using the optional replacements and outputs it at the given directory
Types ¶
type Declaration ¶
type Declaration struct { // A string uniquely identifying this declaration. Identifier string `json:"Identifier" required:"true"` // A unique token generated by the server specifying a particular revision ServerToken string `json:"ServerToken,omitempty"` // The payload describing this declaration. Payload DeclarationPayload `json:"Payload" required:"true"` }
func NewFromType ¶
func NewFromType(typ, id, token string) (*Declaration, error)
func (*Declaration) MarshalJSON ¶
func (d *Declaration) MarshalJSON() ([]byte, error)
func (*Declaration) Type ¶
func (d *Declaration) Type() string
type DeclarationPayload ¶
type DeclarationPayload interface {
DeclarationType() string
}
type EncodeOption ¶
type EncodeOption func(*Encoder)
func WithReplacements ¶
func WithReplacements(reps replace.Replacements) EncodeOption
Click to show internal directories.
Click to hide internal directories.