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.
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(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 ChaosWorkflowCreationData
- type ClusterData
- type ClusterDetails
- type CreateChaosWorkFlowGraphQLRequest
- type CreatedChaosWorkflow
- type Data
- type DeleteChaosWorkflowData
- type DeleteChaosWorkflowDetails
- type DeleteChaosWorkflowGraphQLRequest
- type DisconnectAgentData
- type DisconnectAgentDetails
- type DisconnectAgentGraphQLRequest
- type Errors
- type GetAgentDetails
- type GetChaosWorkFlowRunsGraphQLRequest
- type GetChaosWorkFlowsGraphQLRequest
- type GetServerVersionData
- type Member
- type Payload
- type Project
- type ProjectDetails
- type SendRequestParams
- type ServerVersionData
- type ServerVersionResponse
- type UserAgentReg
- type WorkflowList
- type WorkflowListData
- type WorkflowRunsList
- type WorkflowRunsListData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProjectRequest ¶
func CreateProjectRequest(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 ChaosWorkflowCreationData ¶ added in v0.11.0
type ChaosWorkflowCreationData struct { Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data CreatedChaosWorkflow `json:"data"` }
func CreateWorkflow ¶ added in v0.11.0
func CreateWorkflow(requestData model.ChaosWorkFlowRequest, cred types.Credentials) (ChaosWorkflowCreationData, error)
CreateWorkflow sends GraphQL API request for creating a workflow
type ClusterData ¶ added in v0.5.0
type ClusterData struct { Data GetAgentDetails `json:"data"` Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` }
type ClusterDetails ¶ added in v0.5.0
type CreateChaosWorkFlowGraphQLRequest ¶ added in v0.11.0
type CreateChaosWorkFlowGraphQLRequest struct { Query string `json:"query"` Variables struct { CreateChaosWorkFlowRequest model.ChaosWorkFlowRequest `json:"request"` } `json:"variables"` }
type CreatedChaosWorkflow ¶ added in v0.11.0
type CreatedChaosWorkflow struct {
CreateChaosWorkflow model.ChaosWorkFlowResponse `json:"createChaosWorkFlow"`
}
type DeleteChaosWorkflowData ¶ added in v0.11.0
type DeleteChaosWorkflowData struct { Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data DeleteChaosWorkflowDetails `json:"data"` }
func DeleteChaosWorkflow ¶ added in v0.11.0
func DeleteChaosWorkflow(projectID string, workflowID *string, cred types.Credentials) (DeleteChaosWorkflowData, error)
DeleteChaosWorkflow sends GraphQL API request for deleting a given Chaos Workflow.
type DeleteChaosWorkflowDetails ¶ added in v0.11.0
type DeleteChaosWorkflowDetails struct {
IsDeleted bool `json:"deleteChaosWorkflow"`
}
type DeleteChaosWorkflowGraphQLRequest ¶ added in v0.11.0
type DisconnectAgentData ¶ added in v0.11.0
type DisconnectAgentData struct { Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data DisconnectAgentDetails `json:"data"` }
func DisconnectAgent ¶ added in v0.11.0
func DisconnectAgent(projectID string, clusterIDs []*string, cred types.Credentials) (DisconnectAgentData, error)
DisconnectAgent sends GraphQL API request for disconnecting Chaos Delegate(s).
type DisconnectAgentDetails ¶ added in v0.11.0
type DisconnectAgentDetails struct {
Message string `json:"deleteClusters"`
}
type DisconnectAgentGraphQLRequest ¶ added in v0.11.0
type GetAgentDetails ¶ added in v0.5.0
type GetAgentDetails struct {
GetAgentDetails ClusterDetails `json:"getAgentDetails"`
}
type GetChaosWorkFlowRunsGraphQLRequest ¶ added in v0.11.0
type GetChaosWorkFlowRunsGraphQLRequest struct { Query string `json:"query"` Variables struct { GetChaosWorkFlowRunsRequest model.ListWorkflowRunsRequest `json:"request"` } `json:"variables"` }
type GetChaosWorkFlowsGraphQLRequest ¶ added in v0.11.0
type GetChaosWorkFlowsGraphQLRequest struct { Query string `json:"query"` Variables struct { GetChaosWorkFlowsRequest model.ListWorkflowsRequest `json:"request"` } `json:"variables"` }
type GetServerVersionData ¶ added in v0.12.0
type ProjectDetails ¶
type ProjectDetails struct { Data Data `json:"data"` Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` }
func GetProjectDetails ¶
func GetProjectDetails(c types.Credentials) (ProjectDetails, error)
GetProjectDetails fetches details of the input user
type SendRequestParams ¶
type ServerVersionData ¶ added in v0.12.0
type ServerVersionData struct {
GetServerVersion GetServerVersionData `json:"getServerVersion"`
}
type ServerVersionResponse ¶ added in v0.12.0
type ServerVersionResponse struct { Data ServerVersionData `json:"data"` Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` }
func GetServerVersion ¶ added in v0.12.0
func GetServerVersion(endpoint string) (ServerVersionResponse, error)
GetServerVersion fetches the GQL server version
type UserAgentReg ¶
type WorkflowList ¶ added in v0.11.0
type WorkflowList struct {
ListWorkflowDetails model.ListWorkflowsResponse `json:"listWorkflows"`
}
type WorkflowListData ¶ added in v0.11.0
type WorkflowListData struct { Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data WorkflowList `json:"data"` }
func GetWorkflowList ¶ added in v0.11.0
func GetWorkflowList(in model.ListWorkflowsRequest, cred types.Credentials) (WorkflowListData, error)
GetWorkflowList sends GraphQL API request for fetching a list of workflows.
type WorkflowRunsList ¶ added in v0.11.0
type WorkflowRunsList struct {
ListWorkflowRunsDetails model.ListWorkflowRunsResponse `json:"listWorkflowRuns"`
}
type WorkflowRunsListData ¶ added in v0.11.0
type WorkflowRunsListData struct { Errors []struct { Message string `json:"message"` Path []string `json:"path"` } `json:"errors"` Data WorkflowRunsList `json:"data"` }
func GetWorkflowRunsList ¶ added in v0.11.0
func GetWorkflowRunsList(in model.ListWorkflowRunsRequest, cred types.Credentials) (WorkflowRunsListData, error)
GetWorkflowRunsList sends GraphQL API request for fetching a list of workflow runs.