Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPNLPEngineClient ¶
func NewHTTPNLPEngineClient(httpNLPEngineClientConfig HTTPNLPEngineClientConfig) interfaces.NLPEngine
NewHTTPNLPEngineClient creates a new instance of HTTPNLPEngineClient, which implements the NLPEngine interface.
Types ¶
type Factory ¶
type Factory struct{}
Factory is a struct for creating different implementations of the NLPEngine interface.
func (*Factory) Instantiate ¶
func (f *Factory) Instantiate(config HTTPNLPEngineClientConfig) (interfaces.NLPEngine, error)
Instantiate creates an implementation of the NLPEngine interface.
type HTTPNLPEngineClient ¶
type HTTPNLPEngineClient struct {
// contains filtered or unexported fields
}
HTTPNLPEngineClient is a struct that implements the NLPEngine interface and makes HTTP calls to the dragondrop API.
func (*HTTPNLPEngineClient) PostNLPEngine ¶
func (c *HTTPNLPEngineClient) PostNLPEngine(ctx context.Context) error
PostNLPEngine posts a correctly formatted request to the NLP engine endpoint, receiving and then saving out data on the mapping of new resources to state files.
type HTTPNLPEngineClientConfig ¶
type HTTPNLPEngineClientConfig struct { // VCSRepo is the full path of the repo containing a customer's infrastructure specification. // At the moment, must be a valid GitHub repository URL. VCSRepo string `required:"true"` // NLPEndpoint is the endpoint for the NLP service. NLPEndpoint string // WorkspaceDirectories is a slice of directories that contains terraform workspaces within the user repo. WorkspaceDirectories terraformWorkspace.WorkspaceDirectoriesDecoder `required:"true"` }
HTTPNLPEngineClientConfig is configuration for the HTTPNLPEngineClient struct that conforms to envconfig's format expectations.