~evanj/cms

ref: 0ac69893cd1dd4e4cf2fa1498b99682d247e30cd cms/internal/m/invite/invite.go -rw-r--r-- 347 bytes
0ac69893Evan M Jones Feat(invites and roles): Users can now set roles while inviting others. 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package invite

import (
	"errors"

	"git.sr.ht/~evanj/cms/internal/m/org"
	"git.sr.ht/~evanj/cms/internal/m/role"
)

var (
	ErrExpired = errors.New("this invite has expired")
	ErrUsed    = errors.New("this invite has already been used")
)

type Invite interface {
	ID() string
	Token() string
	Validate() error
	Org() org.Org
	Role() role.Role
}