Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
227
participant.go1 kB
package participation import ( "github.com/samber/lo" "github.com/Southclaws/storyden/app/resources/account" "github.com/Southclaws/storyden/app/resources/profile" "github.com/Southclaws/storyden/internal/ent" ) type EventParticipant struct { Role Role Status Status Account profile.Ref } type EventParticipants []*EventParticipant func (p EventParticipants) IsHost(id account.AccountID) bool { _, isHost := lo.Find(p, func(p *EventParticipant) bool { return p.Account.ID == id && p.Role == RoleHost }) return isHost } func Map(in *ent.EventParticipant) (*EventParticipant, error) { accountEdge, err := in.Edges.AccountOrErr() if err != nil { return nil, err } role, err := NewRole(in.Role) if err != nil { return nil, err } status, err := NewStatus(in.Status) if err != nil { return nil, err } acc, err := profile.MapRef(accountEdge) if err != nil { return nil, err } return &EventParticipant{ Role: role, Status: status, Account: *acc, }, 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