rasax

package
v0.0.0-...-601a7b6 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Copyright © 2021 Rasa Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RasaX

type RasaX struct {
	// BearerToken stores a bearer token.
	BearerToken string

	// Flags defines the command flags.
	Flags *types.RasaCtlFlags

	// URL is a Rasa X URL
	URL string

	// Token stores a Rasa X admin token.
	Token string

	// Log defines logger.
	Log logr.Logger

	// Log defines the spinner object.
	SpinnerMessage *status.SpinnerMessage

	// WaitTimeout defines timeout for the client.
	WaitTimeout time.Duration
	// contains filtered or unexported fields
}

RasaX defines Rasa X client.

func (*RasaX) Auth

func (r *RasaX) Auth(username, password string) (*rtypes.AuthEndpointResponse, error)

func (*RasaX) EnterpriseActivate

func (r *RasaX) EnterpriseActivate(license string) error

EnterpriseActivate activates an Enterprise license via the /api/license endpoint.

func (*RasaX) EnterpriseDeactivate

func (r *RasaX) EnterpriseDeactivate() error

EnterpriseDeactivate deactivates an Enterprise license via the /api/license endpoint.

func (*RasaX) GetHealthEndpoint

func (r *RasaX) GetHealthEndpoint() (*rtypes.HealthEndpointsResponse, error)

GetHealthEndpoint returns a response from the /api/health endpoint.

func (*RasaX) GetVersionEndpoint

func (r *RasaX) GetVersionEndpoint() (*rtypes.VersionEndpointResponse, error)

func (*RasaX) ModelDelete

func (r *RasaX) ModelDelete() error

func (*RasaX) ModelDownload

func (r *RasaX) ModelDownload() error

func (*RasaX) ModelList

func (r *RasaX) ModelList() (*rtypes.ModelsListEndpointResponse, error)

func (*RasaX) ModelTag

func (r *RasaX) ModelTag() error

func (*RasaX) ModelUpload

func (r *RasaX) ModelUpload() error

func (*RasaX) New

func (r *RasaX) New()

New initializes a new Rasa X client.

func (*RasaX) SaveEnvironments

func (r *RasaX) SaveEnvironments(body []rtypes.EnvironmentsEndpointRequest) error

SaveEnvironments add environments to Rasa X via the /environments endpoint. Required Rasa X >= 1.0.

func (*RasaX) ValidateToken

func (r *RasaX) ValidateToken(token string) bool

ValidateToken validates token and returns true if a given token is valid.

func (*RasaX) WaitForDatabaseMigration

func (r *RasaX) WaitForDatabaseMigration(ctx context.Context) error

WaitForDatabaseMigration waits until Rasa X database migration is completed.

func (*RasaX) WaitForRasaServer

func (r *RasaX) WaitForRasaServer(ctx context.Context, environment string) error

WaitForRasaServer waits for Rasa Server in a given environment until it returns the 200 code.

func (*RasaX) WaitForRasaX

func (r *RasaX) WaitForRasaX() error

WaitForRasaX waits for Rasa X to be fully operational, it includes the WaitForDatabaseMigration and the WaitForRasaXWorker methods.

Jump to

Keyboard shortcuts

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