Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
querier.go998 B
package participant_querier import ( "context" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fctx" "github.com/Southclaws/storyden/app/resources/account" "github.com/Southclaws/storyden/app/resources/event/event_ref" "github.com/Southclaws/storyden/app/resources/event/participation" "github.com/Southclaws/storyden/internal/ent" ) type Querier struct { db *ent.Client } func New(db *ent.Client) *Querier { return &Querier{db: db} } func (w *Querier) Lookup(ctx context.Context, mk event_ref.QueryKey, accountID account.AccountID) (*participation.EventParticipant, bool, error) { ep, err := w.db.EventParticipant.Query(). Where(mk.ParticipantPredicate()). WithAccount(). Only(ctx) if err != nil { if ent.IsNotFound(err) { return nil, false, nil } return nil, false, fault.Wrap(err, fctx.With(ctx)) } participant, err := participation.Map(ep) if err != nil { return nil, false, fault.Wrap(err, fctx.With(ctx)) } return participant, true, nil }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server