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
[ | |
{ | |
"id": "gapp_1", | |
"name": "Uptime Kuma", | |
"description": "monitoring", | |
"website": "https://github.com/louislam/uptime-kuma", | |
"manifestUrl": "https://raw.githubusercontent.com/synpse-hq/synpse/feature/appstore/apps/uptime-kuma.yaml", | |
"tags": [], | |
"thumbnail": "https://raw.githubusercontent.com/louislam/uptime-kuma/master/public/icon.svg", | |
"author": "Louis Lam", |
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
{ | |
"cat": { | |
"size": "small", | |
"price": 50 | |
}, | |
"dog": { | |
"size": "medium", | |
"price": 120 | |
}, | |
"cow": { |
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
{ | |
"nothing": "here" | |
} |
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
nothing-here |
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
# This file contains the contact information for repositories exposed through | |
# the Sunstone registry. Each repository has an alias, a url to a file and | |
# one or more maintainers. | |
# | |
# The structure of the repositories object is: | |
# repositories: | |
# - alias: example | |
# url: https://example.com/deployment.yaml | |
# maintainers: | |
# - name: foo |
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
unc (m *FirestoreBinManager) BinDelete(ctx context.Context, binID string) error { | |
_, err := m.client.Collection(m.binsCollection).Doc(binID).Delete(ctx) | |
if err != nil { | |
m.logger.Errorw("failed to delete bin doc by ref", | |
"error", err, | |
) | |
} | |
// Now, get all the requests and delete them in a batch request | |
iter := m.client.Collection(m.reqsCollection).Where("Bin", "==", binID).Documents(ctx) | |
numDeleted := 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
func (m *BinManager) BinPut(ctx context.Context, b *bin.Bin) (err error) { | |
b.Requests = nil | |
encoded, err := proto.Marshal(b) | |
if err != nil { | |
return err | |
} | |
return m.storage.Store(ctx, "bins/"+b.Id, encoded, nil) | |
} | |
... | |
// store package |
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
func (m *FirestoreBinManager) BinPut(ctx context.Context, b *bin.Bin) (err error) { | |
_, err = m.client.Collection(m.binsCollection).Doc(b.GetId()).Set(ctx, b) | |
return err | |
} |
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
func NewFirestoreBinManager(opts *FirestoreBinManagerOpts) (*FirestoreBinManager, error) { | |
ctx := context.Background() | |
var options []option.ClientOption | |
if opts.CredsFile != "" { | |
options = append(options, option.WithCredentialsFile(opts.CredsFile)) | |
} | |
// credentials file option is optional, by default it will use GOOGLE_APPLICATION_CREDENTIALS | |
// environment variable, this is a default method to connect to Google services | |
client, err := firestore.NewClient(ctx, opts.ProjectID, options...) | |
if err != nil { |
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
# Also, create an .env file with configuration | |
# RELAY_KEY= | |
# RELAY_SECRET= | |
# BUCKET= | |
version: '3.2' | |
services: | |
webhookrelay: | |
container_name: webhookrelay | |
image: webhookrelay/webhookrelayd:latest | |
restart: unless-stopped |
NewerOlder