This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for bash users | |
source '#{staged_path}/#{token}/path.bash.inc' | |
source '#{staged_path}/#{token}/completion.bash.inc' | |
for zsh users | |
source '#{staged_path}/#{token}/path.zsh.inc' | |
source '#{staged_path}/#{token}/completion.zsh.inc' | |
for fish users | |
set fish_user_paths #{staged_path}/#{token}/bin | |
set -x MANPATH #{staged_path}/#{token}/help/man /usr/local/share/man /usr/share/man /opt/x11/share/man | |
Run fish_update_completions to generate completions for fish based on the man pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:google_api_pub_sub, “~> 0.0.1”}, | |
{:goth, “~> 0.4.0”} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config :goth, | |
json: File.read!("apps/my_app/priv/static/gcloud_creds.json") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:ok, token} = Goth.Token.for_scope(“https://www.googleapis.com/auth/pubsub") | |
client = token |> Map.get(:token) |> GoogleApi.PubSub.V1.Connection.new() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:ok, token} = Goth.Token.for_scope(“https://www.googleapis.com/auth/pubsub") | |
client = token |> Map.get(:token) |> GoogleApi.PubSub.V1.Connection.new() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias GoogleApi.PubSub.V1.Api.Projects | |
{:ok, topic} = Projects.pubsub_projects_topics_create( | |
client, “my_gcloud_project”, “test_topic”, [body: %{}]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias GoogleApi.PubSub.V1.Api.Projects | |
topics = Projects.pubsub_projects_topics_list(client, “my_google_project”) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias GoogleApi.PubSub.V1.Model | |
data = Base.encode64(“pub sub test message”) | |
message = %Model.PubsubMessage{data: data} | |
publish_request = %Model.PublishRequest{messages: [message]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias GoogleApi.PubSub.V1.Api.Projects | |
Projects.pubsub_projects_topics_publish( | |
client, “my_google_project”, “test_topic”, [body: publish_request]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias GoogleApi.PubSub.V1.Api.Projects | |
pull_request = %GoogleApi.PubSub.V1.Model.PullRequest{maxMessages: 10} | |
Projects.pubsub_projects_subscriptions_pull(client, “my_google_project”, “test_subscription”, [body: pull_request]) |
OlderNewer