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.

    Index

    Constants

    This section is empty.

    Variables

    View Source
    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 DefaultClient() (*Client, error)

    func NewClient

    func NewClient(credentials *config.Credentials) (*Client, error)

    func (*Client) Authenticate

    func (c *Client) Authenticate() error

    func (*Client) CreateScript

    func (c *Client) CreateScript(sc *scripting.Script) (*scripting.Script, error)

    func (*Client) CreateZone

    func (c *Client) CreateZone(name string) (*dns.Zone, error)

    func (*Client) DefaultStack

    func (c *Client) DefaultStack() string

    func (*Client) DeleteScript

    func (c *Client) DeleteScript(sc *scripting.Script) error

    func (*Client) DeleteZone

    func (c *Client) DeleteZone(z *dns.Zone) error

    func (*Client) ListDomains

    func (c *Client) ListDomains() ([]dns.Zone, error)

    func (*Client) ListScripts

    func (c *Client) ListScripts(stackId, siteId string) ([]scripting.Script, error)

    func (*Client) LoadDomain

    func (c *Client) LoadDomain(name string) (*dns.Zone, []dns.ExtendedRecord, error)

    func (*Client) LoadScript

    func (c *Client) LoadScript(stackId, siteId, scriptId string) (*scripting.Script, error)

    func (*Client) LoadScriptVersion

    func (c *Client) LoadScriptVersion(stackId, siteId, scriptId, version string) (*scripting.Script, error)

    func (*Client) UpdateRecords

    func (c *Client) UpdateRecords(z *dns.Zone, changeset []dns.ChangeRecord) (int, error)

    func (*Client) UpdateScript

    func (c *Client) UpdateScript(sc *scripting.Script) (*scripting.Script, error)

    type StatusCodeError

    type StatusCodeError int

    func (StatusCodeError) Error

    func (s StatusCodeError) Error() string

    func (StatusCodeError) StatusCode

    func (s StatusCodeError) StatusCode() int