ably_control

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const CONTROL_API_DEFAULT_URL = "https://control.ably.net/v1"

Variables

This section is empty.

Functions

func CreateRule

Create a new resource

func DeleteRule

Delete resource

func GetAwsAuthSchema

func GetAwsAuthSchema() tfsdk.Attribute

func GetEnvelopedSchema added in v0.5.0

func GetEnvelopedSchema() tfsdk.Attribute

func GetFormatSchema

func GetFormatSchema() tfsdk.Attribute

func GetHeaderSchema

func GetHeaderSchema() tfsdk.Attribute

func GetHeaders

func GetHeaders(headers []AblyRuleHeaders) []ably_control_go.Header

func GetKafkaAuthSchema

func GetKafkaAuthSchema(headers []AblyRuleHeaders) []ably_control_go.Header

func GetPlanRule

func GetPlanRule(plan AblyRule) ably_control_go.NewRule

converts rule from terraform format to control sdk format

func GetRequestMode

func GetRequestMode(plan AblyRule) ably_control_go.RequestMode

func GetRuleSchema

func GetRuleSchema(target map[string]tfsdk.Attribute, markdown_description string) tfsdk.Schema

func ImportResource added in v0.4.0

// Import resource

func New

func New(version string) tfsdk_provider.Provider

func ReadRule

Read resource

func UpdateRule

// Update resource

Types

type AblyApp

type AblyApp struct {
	AccountID              types.String `tfsdk:"account_id"`
	ID                     types.String `tfsdk:"id"`
	Name                   types.String `tfsdk:"name"`
	Status                 types.String `tfsdk:"status"`
	TLSOnly                types.Bool   `tfsdk:"tls_only"`
	FcmKey                 types.String `tfsdk:"fcm_key"`
	ApnsCertificate        types.String `tfsdk:"apns_certificate"`
	ApnsPrivateKey         types.String `tfsdk:"apns_private_key"`
	ApnsUseSandboxEndpoint types.Bool   `tfsdk:"apns_use_sandbox_endpoint"`
}

Ably App

type AblyKey

type AblyKey struct {
	ID              types.String        `tfsdk:"id"`
	AppID           types.String        `tfsdk:"app_id"`
	Name            types.String        `tfsdk:"name"`
	RevocableTokens types.Bool          `tfsdk:"revocable_tokens"`
	Capability      map[string][]string `tfsdk:"capabilities"`
	Status          types.Int64         `tfsdk:"status"`
	Key             types.String        `tfsdk:"key"`
	Created         types.Int64         `tfsdk:"created"`
	Modified        types.Int64         `tfsdk:"modified"`
}

Ably Key

type AblyNamespace

type AblyNamespace struct {
	AppID            types.String `tfsdk:"app_id"`
	ID               types.String `tfsdk:"id"`
	Authenticated    types.Bool   `tfsdk:"authenticated"`
	Persisted        types.Bool   `tfsdk:"persisted"`
	PersistLast      types.Bool   `tfsdk:"persist_last"`
	PushEnabled      types.Bool   `tfsdk:"push_enabled"`
	TlsOnly          types.Bool   `tfsdk:"tls_only"`
	ExposeTimeserial types.Bool   `tfsdk:"expose_timeserial"`
}

Ably Namespace

type AblyQueue

type AblyQueue struct {
	AppID     types.String `tfsdk:"app_id"`
	ID        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	Ttl       types.Int64  `tfsdk:"ttl"`
	MaxLength types.Int64  `tfsdk:"max_length"`
	Region    types.String `tfsdk:"region"`

	AmqpUri                  types.String  `tfsdk:"amqp_uri"`
	AmqpQueueName            types.String  `tfsdk:"amqp_queue_name"`
	StompURI                 types.String  `tfsdk:"stomp_uri"`
	StompHost                types.String  `tfsdk:"stomp_host"`
	StompDestination         types.String  `tfsdk:"stomp_destination"`
	State                    types.String  `tfsdk:"state"`
	MessagesReady            types.Int64   `tfsdk:"messages_ready"`
	MessagesUnacknowledged   types.Int64   `tfsdk:"messages_unacknowledged"`
	MessagesTotal            types.Int64   `tfsdk:"messages_total"`
	StatsPublishRate         types.Float64 `tfsdk:"stats_publish_rate"`
	StatsDeliveryRate        types.Float64 `tfsdk:"stats_delivery_rate"`
	StatsAcknowledgementRate types.Float64 `tfsdk:"stats_acknowledgement_rate"`
	Deadletter               types.Bool    `tfsdk:"deadletter"`
	DeadletterID             types.String  `tfsdk:"deadletter_id"`
}

Ably Queue

type AblyRule

type AblyRule AblyRuleDecoder[any]

func GetRuleResponse

func GetRuleResponse(ably_rule *ably_control_go.Rule, plan *AblyRule) AblyRule

Maps response body to resource schema attributes. Using plan to fill in values that the api does not return.

type AblyRuleDecoder

type AblyRuleDecoder[T any] struct {
	ID          types.String    `tfsdk:"id"`
	AppID       types.String    `tfsdk:"app_id"`
	Status      types.String    `tfsdk:"status"`
	RequestMode types.String    `tfsdk:"request_mode"`
	Source      *AblyRuleSource `tfsdk:"source"`
	Target      T               `tfsdk:"target"`
}

func (*AblyRuleDecoder[_]) Rule

func (r *AblyRuleDecoder[_]) Rule() AblyRule

type AblyRuleHeaders

type AblyRuleHeaders struct {
	Name  types.String `tfsdk:"name"`
	Value types.String `tfsdk:"value"`
}

func ToHeaders

func ToHeaders(plan ably_control_go.Target) []AblyRuleHeaders

type AblyRuleSource

type AblyRuleSource struct {
	ChannelFilter types.String               `tfsdk:"channel_filter"`
	Type          ably_control_go.SourceType `tfsdk:"type"`
}

Ably Rule

type AblyRuleTargetAmqp

type AblyRuleTargetAmqp struct {
	QueueID   string                 `tfsdk:"queue_id"`
	Headers   []AblyRuleHeaders      `tfsdk:"headers"`
	Enveloped bool                   `tfsdk:"enveloped"`
	Format    ably_control_go.Format `tfsdk:"format"`
}

type AblyRuleTargetAmqpExternal

type AblyRuleTargetAmqpExternal struct {
	Url                string                 `tfsdk:"url"`
	RoutingKey         string                 `tfsdk:"routing_key"`
	Exchange           string                 `tfsdk:"exchange"`
	MandatoryRoute     bool                   `tfsdk:"mandatory_route"`
	PersistentMessages bool                   `tfsdk:"persistent_messages"`
	MessageTtl         types.Int64            `tfsdk:"message_ttl"`
	Headers            []AblyRuleHeaders      `tfsdk:"headers"`
	Enveloped          bool                   `tfsdk:"enveloped"`
	Format             ably_control_go.Format `tfsdk:"format"`
}

type AblyRuleTargetAzureFunction

type AblyRuleTargetAzureFunction struct {
	AzureAppID        string                 `tfsdk:"azure_app_id"`
	AzureFunctionName string                 `tfsdk:"function_name"`
	Headers           []AblyRuleHeaders      `tfsdk:"headers"`
	SigningKeyID      string                 `tfsdk:"signing_key_id"`
	Format            ably_control_go.Format `tfsdk:"format"`
}

type AblyRuleTargetCloudflareWorker

type AblyRuleTargetCloudflareWorker struct {
	Url          string            `tfsdk:"url"`
	Headers      []AblyRuleHeaders `tfsdk:"headers"`
	SigningKeyId string            `tfsdk:"signing_key_id"`
}

type AblyRuleTargetGoogleFunction

type AblyRuleTargetGoogleFunction struct {
	Region       string                 `tfsdk:"region"`
	ProjectID    string                 `tfsdk:"project_id"`
	FunctionName string                 `tfsdk:"function_name"`
	Headers      []AblyRuleHeaders      `tfsdk:"headers"`
	SigningKeyId string                 `tfsdk:"signing_key_id"`
	Enveloped    bool                   `tfsdk:"enveloped"`
	Format       ably_control_go.Format `tfsdk:"format"`
}

type AblyRuleTargetHTTP

type AblyRuleTargetHTTP struct {
	Url          string                 `tfsdk:"url"`
	Headers      []AblyRuleHeaders      `tfsdk:"headers"`
	SigningKeyId string                 `tfsdk:"signing_key_id"`
	Format       ably_control_go.Format `tfsdk:"format"`
	Enveloped    bool                   `tfsdk:"enveloped"`
}

type AblyRuleTargetIFTTT

type AblyRuleTargetIFTTT struct {
	WebhookKey string `tfsdk:"webhook_key"`
	EventName  string `tfsdk:"event_name"`
}

type AblyRuleTargetKafka

type AblyRuleTargetKafka struct {
	RoutingKey          string                 `tfsdk:"routing_key"`
	Brokers             []string               `tfsdk:"brokers"`
	KafkaAuthentication KafkaAuthentication    `tfsdk:"auth"`
	Enveloped           bool                   `tfsdk:"enveloped"`
	Format              ably_control_go.Format `tfsdk:"format"`
}

type AblyRuleTargetKinesis

type AblyRuleTargetKinesis struct {
	Region       string                 `tfsdk:"region"`
	StreamName   string                 `tfsdk:"stream_name"`
	PartitionKey string                 `tfsdk:"partition_key"`
	AwsAuth      AwsAuth                `tfsdk:"authentication"`
	Enveloped    bool                   `tfsdk:"enveloped"`
	Format       ably_control_go.Format `tfsdk:"format"`
}

type AblyRuleTargetLambda

type AblyRuleTargetLambda struct {
	Region       string  `tfsdk:"region"`
	FunctionName string  `tfsdk:"function_name"`
	AwsAuth      AwsAuth `tfsdk:"authentication"`
	Enveloped    bool    `tfsdk:"enveloped"`
}

type AblyRuleTargetPulsar

type AblyRuleTargetPulsar struct {
	RoutingKey     string                 `tfsdk:"routing_key"`
	Topic          string                 `tfsdk:"topic"`
	ServiceURL     string                 `tfsdk:"service_url"`
	TlsTrustCerts  []string               `tfsdk:"tls_trust_certs"`
	Authentication PulsarAuthentication   `tfsdk:"authentication"`
	Enveloped      bool                   `tfsdk:"enveloped"`
	Format         ably_control_go.Format `tfsdk:"format"`
}

type AblyRuleTargetSqs

type AblyRuleTargetSqs struct {
	Region       string                 `tfsdk:"region"`
	AwsAccountID string                 `tfsdk:"aws_account_id"`
	QueueName    string                 `tfsdk:"queue_name"`
	AwsAuth      AwsAuth                `tfsdk:"authentication"`
	Enveloped    bool                   `tfsdk:"enveloped"`
	Format       ably_control_go.Format `tfsdk:"format"`
}

type AblyRuleTargetZapier

type AblyRuleTargetZapier struct {
	Url          string            `tfsdk:"url"`
	Headers      []AblyRuleHeaders `tfsdk:"headers"`
	SigningKeyId string            `tfsdk:"signing_key_id"`
}

type AwsAuth

type AwsAuth struct {
	AuthenticationMode types.String `tfsdk:"mode"`
	RoleArn            types.String `tfsdk:"role_arn"`
	AccessKeyId        types.String `tfsdk:"access_key_id"`
	SecretAccessKey    types.String `tfsdk:"secret_access_key"`
}

func GetAwsAuth

func GetAwsAuth(auth *ably_control_go.AwsAuthentication, plan *AblyRule) AwsAuth

Maps response body to resource schema attributes. Using plan to fill in values that the api does not return.

type DefaultAttributePlanModifier

type DefaultAttributePlanModifier struct {
	Default attr.Value
}

func DefaultAttribute

func DefaultAttribute(value attr.Value) DefaultAttributePlanModifier

func (DefaultAttributePlanModifier) Description

func (DefaultAttributePlanModifier) MarkdownDescription

func (m DefaultAttributePlanModifier) MarkdownDescription(ctx context.Context) string

func (DefaultAttributePlanModifier) Modify

type KafkaAuthentication

type KafkaAuthentication struct {
	Sasl Sasl `tfsdk:"sasl"`
}

type PulsarAuthentication

type PulsarAuthentication struct {
	Mode  string `tfsdk:"mode"`
	Token string `tfsdk:"token"`
}

type Rule

type Rule interface {
	Provider() *provider
	Name() string
}

type Sasl

type Sasl struct {
	Mechanism string `tfsdk:"mechanism"`
	Username  string `tfsdk:"username"`
	Password  string `tfsdk:"password"`
}

Jump to

Keyboard shortcuts

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