Documentation
¶
Overview ¶
Copyright © 2021 The LitmusChaos Authors
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.
Copyright © 2021 The LitmusChaos Authors ¶
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.
Copyright © 2021 The LitmusChaos Authors ¶
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.
Copyright © 2021 The LitmusChaos Authors ¶
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 ¶
- func Auth(input types.AuthInput) (types.AuthResponse, error)
- func CreateProjectRequest(userID string, projectName string, cred types.Credentials) (createProjectResponse, error)
- func ListProject(cred types.Credentials) (listProjectResponse, error)
- func SendRequest(params SendRequestParams, payload []byte, method string) (*http.Response, error)
- func UpgradeAgent(c context.Context, cred types.Credentials, projectID string, clusterID string, ...) (string, error)
- type AgentConnect
- type AgentConnectionData
- type AgentData
- type AgentDetails
- type AgentList
- type ClusterData
- type ClusterDetails
- type Data
- type Errors
- type GetAgentDetails
- type Member
- type Payload
- type Project
- type ProjectDetails
- type SendRequestParams
- type UserAgentReg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProjectRequest ¶
func CreateProjectRequest(userID string, projectName string, cred types.Credentials) (createProjectResponse, error)
func ListProject ¶
func ListProject(cred types.Credentials) (listProjectResponse, error)
func SendRequest ¶
Types ¶
type AgentConnect ¶
type AgentConnect struct {
UserAgentReg UserAgentReg `json:"registerCluster"`
}
type AgentConnectionData ¶
type AgentConnectionData struct { Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data AgentConnect `json:"data"` }
func ConnectAgent ¶
func ConnectAgent(agent types.Agent, cred types.Credentials) (AgentConnectionData, error)
ConnectAgent connects the agent with the given details
type AgentData ¶
type AgentData struct { Data AgentList `json:"data"` Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` }
func GetAgentList ¶
func GetAgentList(c types.Credentials, pid string) (AgentData, error)
GetAgentList lists the Chaos Delegate connected to the specified project
type AgentDetails ¶
type AgentList ¶
type AgentList struct {
GetAgent []AgentDetails `json:"listClusters"`
}
type ClusterData ¶
type ClusterData struct { Data GetAgentDetails `json:"data"` Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` }
type ClusterDetails ¶
type GetAgentDetails ¶
type GetAgentDetails struct {
GetAgentDetails ClusterDetails `json:"getAgentDetails"`
}
type Project ¶
type Project struct { ID string `json:"ID"` Name string `json:"Name"` Owner struct { AccID string `json:"AccID"` AccType string `json:"AccType"` } `json:"Owner"` Teams []interface{} `json:"Teams"` State interface{} `json:"State"` CreatedAt string `json:"CreatedAt"` UpdatedAt string `json:"UpdatedAt"` RemovedAt string `json:"RemovedAt"` Members []Member `json:"Members"` }
type ProjectDetails ¶
type ProjectDetails struct {
Data Data `json:"data"`
}
func GetProjectDetails ¶
func GetProjectDetails(c types.Credentials) (ProjectDetails, error)
GetProjectDetails fetches details of the input user