Documentation
¶
Overview ¶
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2023 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2020 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2023 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2022 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2022 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2021 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2021 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2022 Christopher O'Connell * * 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.
* GoStack API Client * * Copyright 2022 Christopher O'Connell * * 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 ¶
- Variables
- type Client
- func (c *Client) AddWafRule(stackId, siteId string, body map[string]interface{}) error
- func (c *Client) Authenticate() error
- func (c *Client) CreateScript(sc *scripting.Script) (*scripting.Script, error)
- func (c *Client) CreateZone(name string) (*dns.Zone, error)
- func (c *Client) DefaultStack() string
- func (c *Client) DeleteScript(sc *scripting.Script) error
- func (c *Client) DeleteWafRule(stackId, siteId, ruleId string) error
- func (c *Client) DeleteZone(z *dns.Zone) error
- func (c *Client) ListDeliveryDomains(stackId, siteId string) ([]site.DeliveryDomain, error)
- func (c *Client) ListDomains() ([]dns.Zone, error)
- func (c *Client) ListScripts(stackId, siteId string) ([]scripting.Script, error)
- func (c *Client) ListSites(stackId string) ([]site.Site, error)
- func (c *Client) ListStacks() ([]stack.Stack, error)
- func (c *Client) ListWafDDoS(stackId, siteId string) (waf.DDoS, error)
- func (c *Client) ListWafRequests(stackId, siteId, trafficType string, start, end time.Time) ([]waf.RequestDetails, error)
- func (c *Client) ListWafRules(stackId, siteId string) ([]site.Rule, error)
- func (c *Client) ListWafTraffic(stackId, siteId string, interval waf.Interval, start, end time.Time) ([]waf.TrafficItem, error)
- func (c *Client) LoadDomain(name string) (*dns.Zone, []dns.ExtendedRecord, error)
- func (c *Client) LoadScript(stackId, siteId, scriptId string) (*scripting.Script, error)
- func (c *Client) LoadScriptVersion(stackId, siteId, scriptId, version string) (*scripting.Script, error)
- func (c *Client) LoadStack(stackId string) (*stack.Stack, error)
- func (c *Client) UpdateRecords(z *dns.Zone, changeset []dns.ChangeRecord) (int, error)
- func (c *Client) UpdateScript(sc *scripting.Script) (*scripting.Script, error)
- func (c *Client) UpdateWafDDoS(stackId, siteId string, global, burst, subsecond int) (waf.DDoS, error)
- func (c *Client) WafRequestStats(stackId, siteId string, start, end time.Time) (*waf.RequestStatistics, error)
- type StatusCodeError
Constants ¶
This section is empty.
Variables ¶
var (
ErrDomainNotFound = errors.New("domain not found")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func DefaultClient ¶
func (*Client) AddWafRule ¶ added in v0.0.5
func (*Client) Authenticate ¶
func (*Client) CreateScript ¶
func (*Client) DefaultStack ¶
func (*Client) DeleteWafRule ¶ added in v0.0.5
func (*Client) ListDeliveryDomains ¶ added in v0.0.2
func (c *Client) ListDeliveryDomains(stackId, siteId string) ([]site.DeliveryDomain, error)
func (*Client) ListScripts ¶
func (*Client) ListWafDDoS ¶ added in v0.0.4
func (*Client) ListWafRequests ¶ added in v0.0.2
func (*Client) ListWafRules ¶ added in v0.0.3
func (*Client) ListWafTraffic ¶ added in v0.0.3
func (*Client) LoadDomain ¶
func (*Client) LoadScript ¶
func (*Client) LoadScriptVersion ¶
func (*Client) UpdateRecords ¶
func (*Client) UpdateScript ¶
func (*Client) UpdateWafDDoS ¶ added in v0.0.4
func (*Client) WafRequestStats ¶ added in v0.0.2
type StatusCodeError ¶
type StatusCodeError int
func (StatusCodeError) Error ¶
func (s StatusCodeError) Error() string
func (StatusCodeError) StatusCode ¶
func (s StatusCodeError) StatusCode() int