Documentation
¶
Overview ¶
Package membership provides explicit local grants, never payment assertions.
Index ¶
- Constants
- Variables
- type Grant
- type GrantInput
- type Module
- type Overview
- type Plan
- type Quota
- type Service
- func (s *Service) AuthorizeSave(ctx context.Context, v any) (any, error)
- func (s *Service) Overview(ctx context.Context, all bool) (Overview, error)
- func (s *Service) SaveGrant(ctx context.Context, q GrantInput) (Grant, error)
- func (s *Service) SavePlan(ctx context.Context, p Plan) error
- func (s *Service) Submissions(ctx context.Context) ([]Submission, error)
- func (s *Service) Submit(ctx context.Context, native content.Service, q SubmissionInput) (Submission, error)
- type Submission
- type SubmissionInput
Constants ¶
View Source
const PermManage = "membership.manage"
Variables ¶
View Source
var ErrConflict = errors.New("membership: stale version")
View Source
var ErrInvalid = errors.New("membership: invalid input")
Functions ¶
This section is empty.
Types ¶
type Grant ¶
type Grant struct {
ID string `json:"id"`
SourceID string `json:"source_id,omitempty"`
OwnerID string `json:"owner_id"`
PlanID string `json:"plan_id"`
Status string `json:"status"`
PeriodStart string `json:"period_start"`
PeriodEnd string `json:"period_end"`
GraceUntil string `json:"grace_until"`
CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
Version string `json:"version"`
EffectiveStatus string `json:"effective_status"`
}
type GrantInput ¶
type Service ¶
func NewService ¶
func (*Service) AuthorizeSave ¶
AuthorizeSave runs inside the content write transaction: quota checks and content insertion/restoration cannot race or be bypassed by another UI.
func (*Service) Submissions ¶
func (s *Service) Submissions(ctx context.Context) ([]Submission, error)
func (*Service) Submit ¶
func (s *Service) Submit(ctx context.Context, native content.Service, q SubmissionInput) (Submission, error)
type Submission ¶
type SubmissionInput ¶
Click to show internal directories.
Click to hide internal directories.