package
0.0.0-20241224124704-d6134829afc6
Repository: https://github.com/0x1115-inc/golang-essentials.git
Documentation: pkg.go.dev

# README

Message System

Google Cloud Pub/Sub setup

  1. Create a new project in Google Cloud Console.
  2. Enable Pub/Sub API.
  3. Create a new topic.
PUBSUB_TOPIC_NAME="my-topic"

gcloud pubsub topics create $PUBSUB_TOPIC_NAME
  1. Create a new subscription.
PUBSUB_SUBSCRIPTION_NAME="my-subscription"

gcloud pubsub subscriptions create $PUBSUB_SUBSCRIPTION_NAME --topic=$PUBSUB_TOPIC_NAME
  1. Create a service account with Pub/Sub Publisher and Subscriber roles.
SERVICE_ACCOUNT_NAME="my-service-account"
SERVICE_ACCOUNT_EMAIL="$SERVICE_ACCOUNT_NAME@$PROJECT_ID.iam.gserviceaccount.com"

# Role for Publisher application
ROLES="roles/pubsub.publisher"

# Role for Subscriber application
ROLES="roles/pubsub.subscriber"

# Attach roles to the service account
gcloud projects add-iam-policy-binding $PROJECT_ID --member=serviceAccount:$SERVICE_ACCOUNT_EMAIL --role=$ROLES

References

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author

# Constants

GCPProvider is the provider name for the Google Cloud Pub/Sub message system when register with the registry.
GCPProvider is the provider name for the Google Cloud Pub/Sub message system when register with the registry.
GCPProvider is the provider name for the Google Cloud Pub/Sub message system when register with the registry.
No description provided by the author

# Structs

No description provided by the author

# Interfaces

MessageSystem is the interface that wraps the basic methods for a message system The message system can be used to publish and receive messages from a channel.

# Type aliases

No description provided by the author