ccloud

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiKey added in v0.1.6

type ApiKey struct {
	common.BaseModel
	Spec ApiKeySpec `json:"spec"`
}

type ApiKeyCommonReq added in v0.1.6

type ApiKeyCommonReq struct {
	Id          string `json:"id"`
	Environment string `json:"environment,omitempty"`
}

type ApiKeyCreateReq added in v0.1.6

type ApiKeyCreateReq struct {
	DisplayName string          `json:"display_name,omitempty"`
	Description string          `json:"description,omitempty"`
	Owner       ApiKeyCommonReq `json:"owner"`
	Resource    ApiKeyCommonReq `json:"resource,omitempty"`
}

type ApiKeyList added in v0.1.6

type ApiKeyList struct {
	common.BaseModel
	Data []ApiKey `json:"data"`
}

type ApiKeyListOptions added in v0.1.6

type ApiKeyListOptions struct {
	common.PaginationOptions
	Owner    string `url:"spec.owner,omitempty"`
	Resource string `url:"spec.resource,omitempty"`
}

type ApiKeySpec added in v0.1.6

type ApiKeySpec struct {
	Description string `json:"description,omitempty"`
	DisplayName string `json:"display_name,omitempty"`
	Owner       common.BaseModel
	Resource    common.BaseModel
	Secret      string `json:"secret,omitempty"`
}

type ApiKeyUpdateReq added in v0.1.6

type ApiKeyUpdateReq struct {
	DisplayName string `json:"display_name,omitempty"`
	Description string `json:"description,omitempty"`
}

type ConfluentClient

type ConfluentClient struct {
	BaseUrl string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(user, password string) *ConfluentClient

func (*ConfluentClient) CreateApiKey added in v0.1.6

func (c *ConfluentClient) CreateApiKey(create *ApiKeyCreateReq) (*ApiKey, error)

func (*ConfluentClient) CreateEnvironment

func (c *ConfluentClient) CreateEnvironment(create *EnvironmentCreateReq) (*ServiceAccount, error)

func (*ConfluentClient) CreateKafkaCluster

func (c *ConfluentClient) CreateKafkaCluster(create *KafkaClusterCreateReq) (*KafkaCluster, error)

func (*ConfluentClient) CreateServiceAccount

func (c *ConfluentClient) CreateServiceAccount(create *ServiceAccountCreateReq) (*ServiceAccount, error)

func (*ConfluentClient) DeleteApiKey added in v0.1.6

func (c *ConfluentClient) DeleteApiKey(id string) error

func (*ConfluentClient) DeleteEnvironment

func (c *ConfluentClient) DeleteEnvironment(environmentId string) error

func (*ConfluentClient) DeleteKafkaCluster

func (c *ConfluentClient) DeleteKafkaCluster(KafkaClusterId string, opt KafkaClusterListOptions) error

func (*ConfluentClient) DeleteServiceAccount

func (c *ConfluentClient) DeleteServiceAccount(serviceAccountId string) error

func (*ConfluentClient) DeleteUser

func (c *ConfluentClient) DeleteUser(userId string) error

func (*ConfluentClient) GetApiKey added in v0.1.6

func (c *ConfluentClient) GetApiKey(apyKeyId string) (*ApiKey, error)

func (*ConfluentClient) GetEnvironment

func (c *ConfluentClient) GetEnvironment(environmentId string) (*Environment, error)

func (*ConfluentClient) GetKafkaCluster

func (c *ConfluentClient) GetKafkaCluster(KafkaClusterId string, opt *KafkaClusterListOptions) (*KafkaCluster, error)

func (*ConfluentClient) GetMe added in v0.1.4

func (c *ConfluentClient) GetMe() (*Profile, error)

func (*ConfluentClient) GetServiceAccount

func (c *ConfluentClient) GetServiceAccount(serviceAccountId string) (*ServiceAccount, error)

func (*ConfluentClient) GetUser

func (c *ConfluentClient) GetUser(userId string) (*User, error)

func (*ConfluentClient) ListApiKeys added in v0.1.6

func (c *ConfluentClient) ListApiKeys(opt *ApiKeyListOptions) (*ApiKeyList, error)

func (*ConfluentClient) ListEnvironments

func (c *ConfluentClient) ListEnvironments(opt *common.PaginationOptions) (*EnvironmentList, error)

func (*ConfluentClient) ListKafkaClusters

func (c *ConfluentClient) ListKafkaClusters(opt *KafkaClusterListOptions) (*KafkaClusterList, error)

func (*ConfluentClient) ListSchemaRegistryRBAC added in v0.1.12

func (c *ConfluentClient) ListSchemaRegistryRBAC(opt *SchemaRegistryRbacListOptions) (*RbacList, error)

func (*ConfluentClient) ListServiceAccounts

func (c *ConfluentClient) ListServiceAccounts(opt *common.PaginationOptions) (*ServiceAccountList, error)

func (*ConfluentClient) ListUsers

func (c *ConfluentClient) ListUsers(opt *common.PaginationOptions) (*UserList, error)

func (*ConfluentClient) UpdateApiKey added in v0.1.6

func (c *ConfluentClient) UpdateApiKey(apyKeyId string, update *ApiKeyUpdateReq) (*ApiKey, error)

func (*ConfluentClient) UpdateEnvironment

func (c *ConfluentClient) UpdateEnvironment(environmentId string, update *EnvironmentUpdateReq) (*Environment, error)

func (*ConfluentClient) UpdateKafkaCluster

func (c *ConfluentClient) UpdateKafkaCluster(KafkaClusterId string, update *KafkaClusterUpdateReq) (*KafkaCluster, error)

func (*ConfluentClient) UpdateServiceAccount

func (c *ConfluentClient) UpdateServiceAccount(serviceAccountId string, update *ServiceAccountUpdateReq) (*ServiceAccount, error)

func (*ConfluentClient) UpdateUser

func (c *ConfluentClient) UpdateUser(userId string, update *UserUpdateReq) (*User, error)

func (*ConfluentClient) V1ListServiceAccounts added in v0.1.3

func (c *ConfluentClient) V1ListServiceAccounts(opt *V1QueryOpts) (*V1ServiceAccountList, error)

type Environment

type Environment struct {
	common.BaseModel
	DisplayName string `json:"display_name"`
}

type EnvironmentCreateReq

type EnvironmentCreateReq struct {
	DisplayName string `json:"display_name"`
}

type EnvironmentList

type EnvironmentList struct {
	common.BaseModel
	Data []Environment `json:"data"`
}

type EnvironmentUpdateReq

type EnvironmentUpdateReq struct {
	DisplayName string `json:"display_name"`
}

type KafkaCluster

type KafkaCluster struct {
	common.BaseModel
	Spec struct {
		DisplayName            string                   `json:"display_name"`
		Availability           KafkaClusterAvailability `json:"availability"`
		Cloud                  common.CloudProvider     `json:"cloud"`
		Region                 string                   `json:"region"`
		KafkaBootstrapEndpoint string                   `json:"kafka_bootstrap_endpoint"`
		HttpEndpoint           string                   `json:"http_endpoint"`
		Config                 struct {
			Kind  KafkaClusterKind `json:"kind"`
			Cku   int              `json:"cku"`
			Zones []string         `json:"zones"`
		}
		Network struct {
			common.BaseModel
		}
		Environment Environment
	}
	Status struct {
		Phase string `json:"phase"`
		CKU   int    `json:"cku"`
	}
}

type KafkaClusterAvailability

type KafkaClusterAvailability string
const (
	KafkaClusterAvailabilitySingleZone KafkaClusterAvailability = "SINGLE_ZONE"
	KafkaClusterAvailabilityMultiZone  KafkaClusterAvailability = "MULTI_ZONE"
)

type KafkaClusterCreateReq

type KafkaClusterCreateReq struct {
	DisplayName  string                   `json:"display_name"`
	Availability KafkaClusterAvailability `json:"availability"`
	Cloud        common.CloudProvider     `json:"cloud"`
	Region       string                   `json:"region"`
	Config       struct {
		Kind KafkaClusterKind `json:"kind"`
		CKU  int              `json:"cku"`
	} `json:"config"`
	Environment struct {
		Id          string `json:"id"`
		Environment string `json:"environment,omitempty"`
	} `json:"environment"`
}

type KafkaClusterKind

type KafkaClusterKind string
const (
	KafkaClusterKindBasic     KafkaClusterKind = "Basic"
	KafkaClusterKindStandard  KafkaClusterKind = "Standard"
	KafkaClusterKindDedicated KafkaClusterKind = "Dedicated"
)

type KafkaClusterList

type KafkaClusterList struct {
	common.BaseModel
	Data []KafkaCluster `json:"data"`
}

type KafkaClusterListOptions

type KafkaClusterListOptions struct {
	common.PaginationOptions
	EnvironmentId string `url:"environment,omitempty"`
}

type KafkaClusterUpdateReq

type KafkaClusterUpdateReq struct {
	DisplayName string `json:"display_name"`
	Config      struct {
		Kind KafkaClusterKind `json:"kind"`
		CKU  int              `json:"cku"`
	} `json:"config"`
	Environment struct {
		Id          string `json:"id"`
		Environment string `json:"environment,omitempty"`
	} `json:"environment"`
}

type Profile added in v0.1.4

type Profile struct {
	Error interface{} `json:"error"`
	User  struct {
		ID                 int       `json:"id"`
		Email              string    `json:"email"`
		FirstName          string    `json:"first_name"`
		LastName           string    `json:"last_name"`
		OrganizationID     int       `json:"organization_id"`
		Deactivated        bool      `json:"deactivated"`
		Verified           time.Time `json:"verified"`
		Created            time.Time `json:"created"`
		Modified           time.Time `json:"modified"`
		ServiceName        string    `json:"service_name"`
		ServiceDescription string    `json:"service_description"`
		ServiceAccount     bool      `json:"service_account"`
		Sso                struct {
			Enabled             bool        `json:"enabled"`
			Auth0ConnectionName string      `json:"auth0_connection_name"`
			TenantID            string      `json:"tenant_id"`
			MultiTenant         bool        `json:"multi_tenant"`
			Overrides           interface{} `json:"overrides"`
			Mode                string      `json:"mode"`
		} `json:"sso"`
		Preferences      map[string]string `json:"preferences"`
		Internal         bool              `json:"internal"`
		ResourceID       string            `json:"resource_id"`
		DeactivatedAt    interface{}       `json:"deactivated_at"`
		SocialConnection string            `json:"social_connection"`
		AuthType         string            `json:"auth_type"`
	} `json:"user"`
	Organization struct {
		ID               int       `json:"id"`
		Name             string    `json:"name"`
		Deactivated      bool      `json:"deactivated"`
		StripeCustomerID string    `json:"stripe_customer_id"`
		Created          time.Time `json:"created"`
		Modified         time.Time `json:"modified"`
		BillingEmail     string    `json:"billing_email"`
		Plan             struct {
			TaxAddress struct {
				Street1 string `json:"street1"`
				Street2 string `json:"street2"`
				City    string `json:"city"`
				State   string `json:"state"`
				Country string `json:"country"`
				Zip     string `json:"zip"`
			} `json:"tax_address"`
			ProductLevel string      `json:"product_level"`
			TrialStart   interface{} `json:"trial_start"`
			TrialEnd     interface{} `json:"trial_end"`
			PlanStart    interface{} `json:"plan_start"`
			PlanEnd      interface{} `json:"plan_end"`
			Product      interface{} `json:"product"`
			Billing      struct {
				Method           string `json:"method"`
				Interval         string `json:"interval"`
				AccruedThisCycle string `json:"accrued_this_cycle"`
				StripeCustomerID string `json:"stripe_customer_id"`
				Email            string `json:"email"`
			} `json:"billing"`
			ReferralCode      string `json:"referral_code"`
			AcceptTos         bool   `json:"accept_tos"`
			AllowMultiTenant  bool   `json:"allow_multi_tenant"`
			AcceptTosPlatform bool   `json:"accept_tos_platform"`
		} `json:"plan"`
		Saml interface{} `json:"saml"`
		Sso  struct {
			Enabled             bool        `json:"enabled"`
			Auth0ConnectionName string      `json:"auth0_connection_name"`
			TenantID            string      `json:"tenant_id"`
			MultiTenant         bool        `json:"multi_tenant"`
			Overrides           interface{} `json:"overrides"`
			Mode                string      `json:"mode"`
		} `json:"sso"`
		Marketplace struct {
			Partner           string `json:"partner"`
			CustomerID        string `json:"customer_id"`
			CustomerState     string `json:"customer_state"`
			ConsoleIntegrated bool   `json:"console_integrated"`
		} `json:"marketplace"`
		ResourceID     string `json:"resource_id"`
		HasEntitlement bool   `json:"has_entitlement"`
		ShowBilling    bool   `json:"show_billing"`
		AuditLog       struct {
			ClusterID                string `json:"cluster_id"`
			AccountID                string `json:"account_id"`
			ServiceAccountID         int    `json:"service_account_id"`
			TopicName                string `json:"topic_name"`
			ServiceAccountResourceID string `json:"service_account_resource_id"`
		} `json:"audit_log"`
		HasCommitment           bool        `json:"has_commitment"`
		MarketplaceSubscription string      `json:"marketplace_subscription"`
		DeactivatedAt           interface{} `json:"deactivated_at"`
		SuspensionStatus        struct {
			Suspended              interface{} `json:"suspended"`
			Status                 string      `json:"status"`
			EventType              string      `json:"event_type"`
			ScheduledDeactivatedAt interface{} `json:"scheduled_deactivated_at"`
		} `json:"suspension_status"`
		DisplayLabel string `json:"display_label"`
	} `json:"organization"`
	Accounts []struct {
		ID             string    `json:"id"`
		Name           string    `json:"name"`
		OrganizationID int       `json:"organization_id"`
		Deactivated    bool      `json:"deactivated"`
		Created        time.Time `json:"created"`
		Modified       time.Time `json:"modified"`
		Config         struct {
			MaxKafkaClusters int `json:"max_kafka_clusters"`
		} `json:"config"`
		Internal      bool        `json:"internal"`
		DeactivatedAt interface{} `json:"deactivated_at"`
		OrgResourceID string      `json:"org_resource_id"`
	} `json:"accounts"`
	Account struct {
		ID             string    `json:"id"`
		Name           string    `json:"name"`
		OrganizationID int       `json:"organization_id"`
		Deactivated    bool      `json:"deactivated"`
		Created        time.Time `json:"created"`
		Modified       time.Time `json:"modified"`
		Config         struct {
			MaxKafkaClusters int `json:"max_kafka_clusters"`
		} `json:"config"`
		Internal      bool        `json:"internal"`
		DeactivatedAt interface{} `json:"deactivated_at"`
		OrgResourceID string      `json:"org_resource_id"`
	} `json:"account"`
}

type Rbac added in v0.1.12

type Rbac struct {
	common.BaseModel
	Principal  string `json:"principal"`
	RoleName   string `json:"role_name"`
	CrnPattern string `json:"crn_pattern"`
}

type RbacList added in v0.1.12

type RbacList struct {
	common.BaseModel
	Data []Rbac `json:"data"`
}

type SchemaRegistryRbacListOptions added in v0.1.12

type SchemaRegistryRbacListOptions struct {
	common.PaginationOptions
	RoleName   string `url:"role_name,omitempty"`
	CrnPattern string `url:"crn_pattern,omitempty"`
	Principal  string `url:"principal,omitempty"`
}

type ServiceAccount

type ServiceAccount struct {
	common.BaseModel
	DisplayName string `json:"display_name"`
	Description string `json:"description"`
}

type ServiceAccountCreateReq

type ServiceAccountCreateReq struct {
	DisplayName string `json:"display_name"`
	Description string `json:"description"`
}

type ServiceAccountList

type ServiceAccountList struct {
	common.BaseModel
	Data []ServiceAccount `json:"data"`
}

type ServiceAccountUpdateReq

type ServiceAccountUpdateReq struct {
	FullName string `json:"full_name"`
}

type User

type User struct {
	common.BaseModel
	Email    string `json:"email"`
	FullName string `json:"full_name"`
}

type UserList

type UserList struct {
	common.BaseModel
	Data []User `json:"data"`
}

type UserUpdateReq

type UserUpdateReq struct {
	FullName string `json:"full_name"`
}

type V1QueryOpts added in v0.1.3

type V1QueryOpts struct {
	PageSize  int32  `url:"page_size,omitempty" json:"page_size,omitempty"`
	PageToken string `url:"page_token,omitempty" json:"page_token,omitempty"`
}

type V1ServiceAccount added in v0.1.3

type V1ServiceAccount struct {
	Id         *int32  `json:"id,omitempty"`
	ResourceId *string `json:"resource_id,omitempty"`
}

func (*V1ServiceAccount) HasId added in v0.1.3

func (s *V1ServiceAccount) HasId() bool

func (*V1ServiceAccount) HasResourceId added in v0.1.4

func (s *V1ServiceAccount) HasResourceId() bool

type V1ServiceAccountList added in v0.1.3

type V1ServiceAccountList struct {
	Users    []V1ServiceAccount `json:"users"`
	PageInfo V1QueryOpts        `json:"page_info"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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