memberinvitations

package
v0.4.0-rc.9-linux-arm64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CreateParams

type CreateParams struct {
	OrganizationSlug  slug.Slug
	InvitationSlug    slug.Slug
	Email             string
	RoleSlug          slug.Slug
	InvitedByUserSlug *slug.Slug
	TokenHash         string
	ExpiresAt         time.Time
}

type Invitation

type Invitation struct {
	Slug              slug.Slug
	OrganizationSlug  slug.Slug
	Email             string
	RoleSlug          slug.Slug
	Status            model.MemberInvitationStatus
	InvitedByUserSlug *slug.Slug
	AcceptedUserSlug  *slug.Slug
	ExpiresAt         time.Time
	LastSentAt        time.Time
	AcceptedAt        *time.Time
	DeclinedAt        *time.Time
	RevokedAt         *time.Time
	ExpiredAt         *time.Time
	CreatedAt         time.Time
	UpdatedAt         time.Time
}

type MarkAcceptedParams

type MarkAcceptedParams struct {
	OrganizationSlug slug.Slug
	InvitationSlug   slug.Slug
	AcceptedUserSlug slug.Slug
	AcceptedAt       time.Time
}

type MarkDeclinedParams

type MarkDeclinedParams struct {
	OrganizationSlug slug.Slug
	InvitationSlug   slug.Slug
	DeclinedAt       time.Time
}

type MarkExpiredParams

type MarkExpiredParams struct {
	OrganizationSlug slug.Slug
	InvitationSlug   slug.Slug
	ExpiredAt        time.Time
}

type MarkRevokedParams

type MarkRevokedParams struct {
	OrganizationSlug slug.Slug
	InvitationSlug   slug.Slug
	RevokedAt        time.Time
}

type RefreshTokenParams

type RefreshTokenParams struct {
	OrganizationSlug slug.Slug
	InvitationSlug   slug.Slug
	TokenHash        string
	ExpiresAt        time.Time
	LastSentAt       time.Time
}

type Repository

type Repository interface {
	Create(ctx context.Context, tx postgres.DBTX, params CreateParams) (*Invitation, error)
	Find(ctx context.Context, tx postgres.DBTX, orgSlug, invitationSlug slug.Slug) (*Invitation, error)
	FindByTokenHash(ctx context.Context, tx postgres.DBTX, tokenHash string) (*Invitation, error)
	FindPendingByEmail(ctx context.Context, tx postgres.DBTX, orgSlug slug.Slug, email string) (*Invitation, error)
	ListByOrganization(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug slug.Slug,
		req model.ListRequest,
	) ([]*Invitation, error)
	ExpirePendingByOrganization(ctx context.Context, tx postgres.DBTX, orgSlug slug.Slug, expiredAt time.Time) ([]*Invitation, error)
	ListPendingByEmail(ctx context.Context, tx postgres.DBTX, email string, asOf time.Time) ([]*Invitation, error)
	RefreshToken(ctx context.Context, tx postgres.DBTX, params RefreshTokenParams) (*Invitation, error)
	MarkAccepted(ctx context.Context, tx postgres.DBTX, params MarkAcceptedParams) (*Invitation, error)
	MarkDeclined(ctx context.Context, tx postgres.DBTX, params MarkDeclinedParams) (*Invitation, error)
	MarkRevoked(ctx context.Context, tx postgres.DBTX, params MarkRevokedParams) (*Invitation, error)
	MarkExpired(ctx context.Context, tx postgres.DBTX, params MarkExpiredParams) (*Invitation, error)
}

func NewRepository

func NewRepository() Repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL