kaleido

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

View Source
const (
	SingleOrg      = "single-org"
	MultiOrg       = "multi-org"
	DELETE_PENDING = "delete_pending"
	DELETED        = "deleted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCreds

type AppCreds struct {
	MembershipId string `json:"membership_id"`
	AuthType     string `json:"auth_type,omitempty"`
	Username     string `json:"username,omitempty"`
	Password     string `json:"password,omitempty"`
	Id           string `json:"_id,omitempty"`
}

func NewAppCreds

func NewAppCreds(membershipId string) AppCreds

type CZone

type CZone struct {
	Name   string `json:"name"`
	Id     string `json:"_id,omitempty"`
	Region string `json:"region,omitempty"`
	Cloud  string `json:"cloud,omitempty"`
	Type   string `json:"type,omitempty"`
}

func NewCZone

func NewCZone(name, region, cloud string) CZone

type Consortium

type Consortium struct {
	Id          string `json:"_id,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`
	DeletedAt   string `json:"deleted_at,omitempty"`
	State       string `json:"state,omitempty"`
}

func NewConsortium

func NewConsortium(name, description string) Consortium

type EZone

type EZone struct {
	Name   string `json:"name"`
	Id     string `json:"_id,omitempty"`
	Region string `json:"region,omitempty"`
	Cloud  string `json:"cloud,omitempty"`
	Type   string `json:"type,omitempty"`
}

func NewEZone

func NewEZone(name, region, cloud string) EZone

type Environment

type Environment struct {
	Name          string       `json:"name"`
	Description   string       `json:"description"`
	Provider      string       `json:"provider"`
	ConsensusType string       `json:"consensus_type"`
	Id            string       `json:"_id,omitempty"`
	State         string       `json:"state,omitempty"`
	ReleaseId     string       `json:"release_id,omitempty"`
	TestFeatures  TestFeatures `json:"test_features,omitempty"`
	BlockPeriod   int          `json:"block_period"`
}

func NewEnvironment

func NewEnvironment(name, description, provider, consensus string, multiRegion bool, blockPeriod int) Environment

type Invitation

type Invitation struct {
	OrgName string `json:"org_name"`
	Email   string `json:"email"`
	Id      string `json:"_id,omitempty"`
	State   string `json:"state,omitempty"`
}

func NewInvitation

func NewInvitation(orgName, email string) Invitation

type KaleidoClient

type KaleidoClient struct {
	Client *resty.Client
}

func NewClient

func NewClient(api string, apiKey string) KaleidoClient

func (*KaleidoClient) CreateAppCreds

func (c *KaleidoClient) CreateAppCreds(consortiumId, envId string, appcreds *AppCreds) (*resty.Response, error)

func (*KaleidoClient) CreateCZone

func (c *KaleidoClient) CreateCZone(consortium string, ezone *CZone) (*resty.Response, error)

func (*KaleidoClient) CreateConsortium

func (c *KaleidoClient) CreateConsortium(consortium *Consortium) (*resty.Response, error)

func (*KaleidoClient) CreateEZone

func (c *KaleidoClient) CreateEZone(consortium, envId string, ezone *EZone) (*resty.Response, error)

func (*KaleidoClient) CreateEnvironment

func (c *KaleidoClient) CreateEnvironment(consortiumId string, environment *Environment) (*resty.Response, error)

func (*KaleidoClient) CreateInvitation

func (c *KaleidoClient) CreateInvitation(consortiaId string, invitation *Invitation) (*resty.Response, error)

func (*KaleidoClient) CreateMembership

func (c *KaleidoClient) CreateMembership(consortiaId string, membership *Membership) (*resty.Response, error)

func (*KaleidoClient) CreateNode

func (c *KaleidoClient) CreateNode(consortium, envId string, node *Node) (*resty.Response, error)

func (*KaleidoClient) CreateService

func (c *KaleidoClient) CreateService(consortium, envId string, service *Service) (*resty.Response, error)

func (*KaleidoClient) DeleteAppCreds

func (c *KaleidoClient) DeleteAppCreds(consortiumId, envId, appcredsId string) (*resty.Response, error)

func (*KaleidoClient) DeleteCZone

func (c *KaleidoClient) DeleteCZone(consortium, ezoneId string) (*resty.Response, error)

func (*KaleidoClient) DeleteConsortium

func (c *KaleidoClient) DeleteConsortium(consortiumId string) (*resty.Response, error)

func (*KaleidoClient) DeleteEZone

func (c *KaleidoClient) DeleteEZone(consortium, envId, ezoneId string) (*resty.Response, error)

func (*KaleidoClient) DeleteEnvironment

func (c *KaleidoClient) DeleteEnvironment(consortiumId, environmentId string) (*resty.Response, error)

func (*KaleidoClient) DeleteInvitation

func (c *KaleidoClient) DeleteInvitation(consortiaId, invitationId string) (*resty.Response, error)

func (*KaleidoClient) DeleteMembership

func (c *KaleidoClient) DeleteMembership(consortiaId, membershipId string) (*resty.Response, error)

func (*KaleidoClient) DeleteNode

func (c *KaleidoClient) DeleteNode(consortium, envId, nodeId string) (*resty.Response, error)

func (*KaleidoClient) DeleteService

func (c *KaleidoClient) DeleteService(consortium, envId, serviceId string) (*resty.Response, error)

func (*KaleidoClient) GetAppCreds

func (c *KaleidoClient) GetAppCreds(consortiumId, envId, appcredsId string, resultBox *AppCreds) (*resty.Response, error)

func (*KaleidoClient) GetCZone

func (c *KaleidoClient) GetCZone(consortiumId, ezoneId string, resultBox *CZone) (*resty.Response, error)

func (*KaleidoClient) GetConsortium

func (c *KaleidoClient) GetConsortium(id string, resultBox *Consortium) (*resty.Response, error)

func (*KaleidoClient) GetEZone

func (c *KaleidoClient) GetEZone(consortiumId, envId, ezoneId string, resultBox *EZone) (*resty.Response, error)

func (*KaleidoClient) GetEnvironment

func (c *KaleidoClient) GetEnvironment(consortiumId, environmentId string, resultBox *Environment) (*resty.Response, error)

func (*KaleidoClient) GetInvitation

func (c *KaleidoClient) GetInvitation(consortiaId, invitationId string, resultBox *Invitation) (*resty.Response, error)

func (*KaleidoClient) GetMembership

func (c *KaleidoClient) GetMembership(consortiaId, membershipId string, resultBox *Membership) (*resty.Response, error)

func (*KaleidoClient) GetNode

func (c *KaleidoClient) GetNode(consortiumId, envId, nodeId string, resultBox *Node) (*resty.Response, error)

func (*KaleidoClient) GetRelease

func (c *KaleidoClient) GetRelease(provider, version string, resultBox *[]Release) (*resty.Response, error)

func (*KaleidoClient) GetService

func (c *KaleidoClient) GetService(consortiumId, envId, serviceId string, resultBox *Service) (*resty.Response, error)

func (*KaleidoClient) ListAppCreds

func (c *KaleidoClient) ListAppCreds(consortiumId, envId string, resultBox *[]AppCreds) (*resty.Response, error)

func (*KaleidoClient) ListCZones

func (c *KaleidoClient) ListCZones(consortium string, resultBox *[]CZone) (*resty.Response, error)

func (*KaleidoClient) ListConsortium

func (c *KaleidoClient) ListConsortium(resultBox *[]Consortium) (*resty.Response, error)

func (*KaleidoClient) ListEZones

func (c *KaleidoClient) ListEZones(consortium, envId string, resultBox *[]EZone) (*resty.Response, error)

func (*KaleidoClient) ListEnvironments

func (c *KaleidoClient) ListEnvironments(consortiumId string, resultBox *[]Environment) (*resty.Response, error)

func (*KaleidoClient) ListInvitations

func (c *KaleidoClient) ListInvitations(consortiaId string, resultBox *[]Invitation) (*resty.Response, error)

func (*KaleidoClient) ListMemberships

func (c *KaleidoClient) ListMemberships(consortiaId string, resultBox *[]Membership) (*resty.Response, error)

func (*KaleidoClient) ListNodes

func (c *KaleidoClient) ListNodes(consortium, envId string, resultBox *[]Node) (*resty.Response, error)

func (*KaleidoClient) ListReleases

func (c *KaleidoClient) ListReleases(resultBox *[]Release) (*resty.Response, error)

func (*KaleidoClient) ListServices

func (c *KaleidoClient) ListServices(consortium, envId string, resultBox *[]Service) (*resty.Response, error)

type Membership

type Membership struct {
	OrgName string `json:"org_name"`
	Id      string `json:"_id,omitempty"`
}

func NewMembership

func NewMembership(orgName string) Membership

type Node

type Node struct {
	Name          string `json:"name"`
	MembershipId  string `json:"membership_id"`
	ZoneId        string `json:"zone_id,omitempty"`
	Id            string `json:"_id,omitempty"`
	State         string `json:"state,omitempty"`
	Role          string `json:"role,omitempty"`
	Provider      string `json:"provider,omitempty"`
	ConsensusType string `json:"consensus_type,omitempty"`
	Size          string `json:"size,omitempty"`
	Urls          *struct {
		RPC string `json:"rpc,omitempty"`
		WSS string `json:"wss, omitempty"`
	} `json:"urls,omitempty"`
}

func NewNode

func NewNode(name, membershipId, ezoneId string) Node

type Release

type Release struct {
	Id            string `json:"_id,omitempty"`
	Provider      string `json:"provider,omitempty"`
	Version       string `json:"version,omitempty"`
	VersionPadded string `json:"version_padded,omitempty"`
	ReleaseStatus string `json:"release_status,omitempty"`
}

type Service

type Service struct {
	Name         string                 `json:"name"`
	Service      string                 `json:"service"`
	MembershipId string                 `json:"membership_id"`
	Id           string                 `json:"_id,omitempty"`
	State        string                 `json:"state,omitempty"`
	Role         string                 `json:"role,omitempty"`
	Urls         map[string]interface{} `json:"urls,omitempty"`
}

func NewService

func NewService(name, service, membershipId string) Service

type TestFeatures

type TestFeatures struct {
	MultiRegion bool `json:"multi_region,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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