projectInvite

package
v0.0.0-...-fa3e48d Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatedAtField

type CreatedAtField struct {
	CreatedAt time.Time `json:"createdAt"`
}

type EmailField

type EmailField struct {
	Email sharedTypes.Email `json:"email"`
}

type ExpiresAtField

type ExpiresAtField struct {
	Expires time.Time `json:"expires"`
}

type ForListing

type ForListing struct {
	EmailField
	IdField
	PrivilegeLevelField
}

type IdField

type IdField struct {
	Id sharedTypes.UUID `json:"_id"`
}

type Manager

type Manager interface {
	Accept(ctx context.Context, projectId, userId sharedTypes.UUID, token Token) error
	Delete(ctx context.Context, projectId, inviteId sharedTypes.UUID) error
	CheckExists(ctx context.Context, projectId sharedTypes.UUID, token Token) error
	Create(ctx context.Context, pi *WithToken) error
	GetById(ctx context.Context, projectId, inviteId, actorId sharedTypes.UUID) (*WithToken, error)
	GetAllForProject(ctx context.Context, projectId, userId sharedTypes.UUID) ([]ForListing, error)
}

func New

func New(db *pgxpool.Pool) Manager

type PrivilegeLevelField

type PrivilegeLevelField struct {
	PrivilegeLevel sharedTypes.PrivilegeLevel `json:"privileges"`
}

type ProjectField

type ProjectField struct {
	ProjectId sharedTypes.UUID `json:"-"`
}

type SendingUserField

type SendingUserField struct {
	SendingUser user.WithPublicInfo `json:"-"`
}

type Token

type Token string

func (Token) Validate

func (t Token) Validate() error

type TokenField

type TokenField struct {
	Token Token `json:"-"`
}

type WithToken

type WithToken struct {
	WithoutToken
	TokenField
}

Jump to

Keyboard shortcuts

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