revision

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reviser

type Reviser struct {
	validation.Validator
	// contains filtered or unexported fields
}

func NewReviser

func NewReviser(interfaceOrBytes model.InterfaceOrBytes, desiredVersion string) (upgrader Reviser, err error)

NewReviser returns an upgrader with a validator created from the desired version.

func (*Reviser) GetModelVersion

func (u *Reviser) GetModelVersion() string

GetModelVersion returns the version of the model being upgraded.

func (*Reviser) GetRevisedBytes

func (u *Reviser) GetRevisedBytes(ext string) (bytes []byte, err error)

GetRevisedBytes returns the upgraded model as bytes, marshalled to the desired extension.

func (*Reviser) GetRevisedJsonMap

func (u *Reviser) GetRevisedJsonMap() map[string]interface{}

GetRevisedJsonMap sets the upgraded model.

func (*Reviser) Revise

func (u *Reviser) Revise() (err error)

type RevisionOptions

type RevisionOptions struct {
	InputFile        string // filepath json or yaml
	OutputFile       string // filepath json or yaml
	Version          string // OSCAL version X.X.X
	ValidationResult string // filepath json or yaml
}

type RevisionResponse

type RevisionResponse struct {
	Reviser      Reviser
	Result       validation.ValidationResult
	Warnings     []string
	RevisedBytes []byte
}

func RevisionCommand

func RevisionCommand(opts *RevisionOptions) (revisionResponse RevisionResponse, err error)

RevisionCommand Runs the revision and returns the revision response For Consumers, this method assumes no ReviseOptions defaults. All defaults are handled in the cobra command.

Jump to

Keyboard shortcuts

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