Documentation
¶
Index ¶
- func CountOrgAgents(ctx context.Context, exec boil.ContextExecutor, orgID string) (int64, error)
- func GetIDsForIdentity(ctx context.Context, boxExec boil.ContextExecutor, redConn *redis.Client, ...) ([]string, error)
- func IsAgent(ctx context.Context, exec boil.ContextExecutor, orgID, identityID string) (bool, error)
- func MustBeAdmin(ctx context.Context, exec boil.ContextExecutor, orgID string, ...) error
- type AgentFilters
- type AgentView
- type IdentityView
- type Org
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountOrgAgents ¶
CountOrgAgents ...
func GetIDsForIdentity ¶
func GetIDsForIdentity(ctx context.Context, boxExec boil.ContextExecutor, redConn *redis.Client, identityID string) ([]string, error)
TODO (structure): the cache should be refactored into a cross-module package (inside sdk eventually)
func IsAgent ¶
Types ¶
type AgentFilters ¶
type AgentFilters struct { Offset null.Int Limit null.Int OrganizationID string }
type AgentView ¶
type AgentView struct { *sqlboiler.OrganizationAgent View IdentityView `json:"identity"` }
func ListAgents ¶
func ListAgents(ctx context.Context, exec boil.ContextExecutor, filters AgentFilters) ([]*AgentView, error)
type IdentityView ¶
type IdentityView struct { ID string `json:"id"` DisplayName string `json:"display_name"` AvatarURL null.String `json:"avatar_url"` IdentifierValue string `json:"identifier_value"` IdentifierKind identity.IdentifierKind `json:"identifier_kind"` }
type Org ¶
type Org struct { ID string `json:"id"` Name string `json:"name"` Slug string `json:"slug"` CreatorID string `json:"creator_id"` CreatedAt time.Time `json:"created_at"` // for now, this is ignored Domain null.String `json:"-"` // https://gitlab.misakey.dev/misakey/user-needs/-/issues/392 LogoURL null.String `json:"-"` // https://gitlab.misakey.dev/misakey/user-needs/-/issues/395 }
func Create ¶
func ListByIDsOrRole ¶
Click to show internal directories.
Click to hide internal directories.