rootspring / data_tasks.go
0 j'aimes
0 forks
1 fichiers
Dernière activité
1 | package assets |
2 | |
3 | import ( |
4 | "popplio/state" |
5 | |
6 | "github.com/infinitybotlist/eureka/dovewing" |
7 | jsoniter "github.com/json-iterator/go" |
8 | "go.uber.org/zap" |
9 | ) |
rootspring / decryptTicket.ts
0 j'aimes
0 forks
1 fichiers
Dernière activité
1 | interface DownloadFileCallbacks { |
2 | onDownloadStart?: (mode: string, url: string) => void |
3 | onDecryptStart?: (mode: string, url: string) => void |
4 | } |
5 | |
6 | const downloadFile = async (ticketId: string, encKey: string, attachment: Attachment, callbacks?: DownloadFileCallbacks) => { |
7 | // Legacy: CDN cached |
8 | if(attachment?.url || attachment?.proxy_url) { |
9 | // Download the file |
10 | let url = attachment?.proxy_url ? attachment?.proxy_url : attachment?.url |
rootspring / assetcleaner.rs
0 j'aimes
0 forks
1 fichiers
Dernière activité
1 | use log::{info, warn, error}; |
2 | |
3 | pub async fn asset_cleaner(pool: &sqlx::PgPool) -> Result<(), crate::Error> { |
4 | let type_id_map = indexmap::indexmap! { |
5 | "bots" => "bot_id", |
6 | "servers" => "server_id", |
7 | "teams" => "id", |
8 | "partners" => "id", |
9 | }; |
rootspring / genericcleaner.rs
0 j'aimes
0 forks
1 fichiers
Dernière activité
1 | use std::str::FromStr; |
2 | |
3 | use futures_util::StreamExt; |
4 | use log::{info, warn}; |
5 | use sqlx::Row; |
6 | use strum::VariantNames; |
7 | use strum_macros::{EnumVariantNames, EnumString}; |
8 | |
9 | #[derive(EnumVariantNames, EnumString)] |
10 | enum Entity { |
rootspring / frontend.svelte
1 j'aimes
0 forks
1 fichiers
Dernière activité
1 | <script lang="ts"> |
2 | import ButtonReact from "$lib/components/ButtonReact.svelte"; |
3 | import GreyText from "$lib/components/GreyText.svelte"; |
4 | import InputNumber from "$lib/components/InputNumber.svelte"; |
5 | import InputSm from "$lib/components/InputSm.svelte"; |
6 | import MultiInput from "$lib/components/MultiInput.svelte"; |
7 | import KvMultiInput from "$lib/components/KVMultiInput.svelte"; |
8 | import Select from "$lib/components/Select.svelte"; |
9 | import DeployWebhook from "./DeployWebhook.svelte"; |
10 | import type { Data } from "./dpsettings"; |
rootspring / webhooks.md
0 j'aimes
0 forks
1 fichiers
Dernière activité
Parsing webhooks
To parse webhooks, here is the algorithm you should/must follow:
Examples are provided in JS as of right now
- Check the protocol version:
- The current protocol version is
splashtail
- Check the
X-Webhook-Protocol
header and ensure that it is equal to the current protocol version
- The current protocol version is
rootspring / d
0 j'aimes
0 forks
1 fichiers
Dernière activité
1 | func (w *GatewayClient) HandleEvent(event []byte, typ string) { |
2 | if w.EventHandlers.RawSinkFunc != nil { |
3 | w.EventHandlers.RawSinkFunc(w, event, typ) |
4 | } |
5 | |
6 | if typ == "Bulk" { |
7 | // Bulk is a bit unique, special handling is required |
8 | err := w.HandleBulk(event) |
9 | |
10 | if err != nil { |
rootspring / sofar.go
0 j'aimes
0 forks
1 fichiers
Dernière activité
1 | // Event handler for the websocket |
2 | type EventHandlers struct { |
3 | // Not an actual revolt event, this is a sink that allows you to provide a function for raw event handling |
4 | RawSinkFunc func(w *GatewayClient, data []byte, typ string) |
5 | |
6 | // An error occurred which meant you couldn't authenticate. |
7 | // |
8 | // <Note that grevolt handles these for you in general, but you can provide additional logic here> |
9 | Error func(w *GatewayClient, e *events.Error) |
rootspring / User Auth External Example
0 j'aimes
0 forks
1 fichiers
Dernière activité
1 | type iLogin struct { |
2 | code string |
3 | state string |
4 | } |
5 | |
6 | var loginCh = make(chan iLogin) |
7 | |
8 | func init() { |
9 | // Load login webserver |
10 | http.HandleFunc("/auth/sauron", func(w http.ResponseWriter, r *http.Request) { |
Plus récent
Plus ancien