cmd

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: AGPL-3.0 Imports: 7 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateBillingSubscription added in v0.20.0

type ActivateBillingSubscription struct {
	TenantID int
}

type ActivateStripeSubscription added in v0.33.0

type ActivateStripeSubscription struct {
	TenantID       int
	CustomerID     string
	SubscriptionID string
}

type ActivateTenant

type ActivateTenant struct {
	TenantID int
}

type AddMentionNotification added in v0.25.0

type AddMentionNotification struct {
	UserID    int `db:"user_id"`
	CommentID int `db:"comment_id"`
	PostID    int `db:"post_id"`
}

type AddNewComment

type AddNewComment struct {
	Post    *entity.Post
	Content string

	Result *entity.Comment
}

type AddNewNotification

type AddNewNotification struct {
	User   *entity.User
	Title  string
	Link   string
	PostID int

	Result *entity.Notification
}

type AddNewPost

type AddNewPost struct {
	Title       string
	Description string

	Result *entity.Post
}

type AddNewTag

type AddNewTag struct {
	Name     string
	Color    string
	IsPublic bool

	Result *entity.Tag
}

type AddSubscriber

type AddSubscriber struct {
	Post *entity.Post
	User *entity.User
}

type AddVote

type AddVote struct {
	Post *entity.Post
	User *entity.User
}

type ApproveComment added in v0.33.0

type ApproveComment struct {
	CommentID int
}

type ApprovePost added in v0.33.0

type ApprovePost struct {
	PostID int
}

type AssignTag

type AssignTag struct {
	Tag  *entity.Tag
	Post *entity.Post
}

type BlockUser

type BlockUser struct {
	UserID int
}

type BulkApproveItems added in v0.33.0

type BulkApproveItems struct {
	PostIDs    []int
	CommentIDs []int
}

type BulkDeclineItems added in v0.33.0

type BulkDeclineItems struct {
	PostIDs    []int
	CommentIDs []int
}

type CancelBillingSubscription added in v0.20.0

type CancelBillingSubscription struct {
	TenantID int
}

type CancelStripeSubscription added in v0.33.0

type CancelStripeSubscription struct {
	TenantID int
}

type CancelTenantDeletion added in v0.36.0

type CancelTenantDeletion struct {
	TenantID int
}

CancelTenantDeletion clears a pending deletion schedule, leaving the tenant untouched.

type ChangeUserEmail

type ChangeUserEmail struct {
	UserID int
	Email  string
}

type ChangeUserRole

type ChangeUserRole struct {
	UserID int
	Role   enum.Role
}

type CreateTenant

type CreateTenant struct {
	Name      string
	Subdomain string
	Status    enum.TenantStatus

	Result *entity.Tenant
}

type DeclineComment added in v0.33.0

type DeclineComment struct {
	CommentID int
}

type DeclinePost added in v0.33.0

type DeclinePost struct {
	PostID int
}

type DeleteBlob

type DeleteBlob struct {
	Key string
}

type DeleteComment

type DeleteComment struct {
	CommentID int
}

type DeleteCurrentUser

type DeleteCurrentUser struct {
}

type DeleteTag

type DeleteTag struct {
	Tag *entity.Tag
}

type DeleteTenant added in v0.36.0

type DeleteTenant struct {
	TenantID int
}

DeleteTenant permanently removes a tenant and all of its data. Irreversible.

type GetWebhookProps added in v0.20.0

type GetWebhookProps struct {
	Type enum.WebhookType

	Result webhook.Props
}

type HTTPRequest

type HTTPRequest struct {
	URL       string
	Body      io.Reader
	Method    string
	Headers   map[string]string
	BasicAuth *dto.BasicAuth

	//Output
	ResponseBody       []byte
	ResponseStatusCode int
	ResponseHeader     http.Header
}

type IncrementVerificationAttempts added in v0.35.0

type IncrementVerificationAttempts struct {
	Key string
}

type InvalidatePreviousSignUpKeys added in v0.31.0

type InvalidatePreviousSignUpKeys struct {
}

type InvalidateVerificationsByEmail added in v0.35.0

type InvalidateVerificationsByEmail struct {
	Email string
	Kind  enum.EmailVerificationKind
}

type LogDebug

type LogDebug struct {
	Message string
	Props   dto.Props
}

type LogError

type LogError struct {
	Err     error
	Message string
	Props   dto.Props
}

type LogInfo

type LogInfo struct {
	Message string
	Props   dto.Props
}

type LogWarn

type LogWarn struct {
	Message string
	Props   dto.Props
}

type MarkAllNotificationsAsRead

type MarkAllNotificationsAsRead struct{}

type MarkNotificationAsRead

type MarkNotificationAsRead struct {
	ID int
}

type MarkPostAsDuplicate

type MarkPostAsDuplicate struct {
	Post     *entity.Post
	Original *entity.Post
}

type NewEmailVerification added in v0.19.0

type NewEmailVerification interface {
	GetEmail() string
	GetName() string
	GetUser() *entity.User
	GetKind() enum.EmailVerificationKind
}

NewEmailVerification is used to define an email verification process

type ParseOAuthRawProfile

type ParseOAuthRawProfile struct {
	Provider string
	Body     string

	Result *dto.OAuthUserProfile
}

type PreviewWebhook added in v0.20.0

type PreviewWebhook struct {
	Type    enum.WebhookType
	Url     string
	Content string

	Result *dto.WebhookPreviewResult
}

type PurgeExpiredNotifications

type PurgeExpiredNotifications struct {
	NumOfDeletedNotifications int
}

type RegenerateAPIKey

type RegenerateAPIKey struct {
	Result string
}

type RegisterUser

type RegisterUser struct {
	User *entity.User
}

type RegisterUserProvider

type RegisterUserProvider struct {
	UserID       int
	ProviderName string
	ProviderUID  string
}

type RemoveSubscriber

type RemoveSubscriber struct {
	Post *entity.Post
	User *entity.User
}

type RemoveVote

type RemoveVote struct {
	Post *entity.Post
	User *entity.User
}

type RotateAllUserSecurityStamps added in v0.34.0

type RotateAllUserSecurityStamps struct{}

type SaveCustomOAuthConfig

type SaveCustomOAuthConfig struct {
	ID                int
	Provider          string
	Status            int
	DisplayName       string
	ClientID          string
	ClientSecret      string
	AuthorizeURL      string
	TokenURL          string
	Scope             string
	ProfileURL        string
	IsTrusted         bool
	JSONUserIDPath    string
	JSONUserNamePath  string
	JSONUserEmailPath string
	JSONUserRolesPath string
	AllowedRoles      string
}

type SaveVerificationKey

type SaveVerificationKey struct {
	Key      string
	Code     string
	Duration time.Duration
	Request  NewEmailVerification
}

type ScheduleTenantDeletion added in v0.36.0

type ScheduleTenantDeletion struct {
	TenantID          int
	RequestedByUserID int
	CancelKey         string
	ScheduledAt       time.Time
}

ScheduleTenantDeletion records the account owner's request to delete the whole site. The tenant stays active during the grace window; a background job performs the hard delete once ScheduledAt passes. CancelKey authorises the email cancel link.

type SendMail

type SendMail struct {
	From         dto.Recipient
	To           []dto.Recipient
	TemplateName string
	Props        dto.Props
}

type SetAttachments

type SetAttachments struct {
	Post        *entity.Post
	Comment     *entity.Comment
	Attachments []*dto.ImageUpload
}

type SetKeyAsVerified

type SetKeyAsVerified struct {
	Key string
}

type SetPostResponse

type SetPostResponse struct {
	Post   *entity.Post
	Text   string
	Status enum.PostStatus
}

type SetSystemSettings added in v0.20.0

type SetSystemSettings struct {
	Key   string
	Value string
}

type SetTenantProviderStatus added in v0.30.0

type SetTenantProviderStatus struct {
	Provider  string
	IsEnabled bool
}

type StoreBlob

type StoreBlob struct {
	Key         string
	Content     []byte
	ContentType string
}

type StoreEvent

type StoreEvent struct {
	ClientIP  string
	EventName string
}

type SupressEmail added in v0.20.0

type SupressEmail struct {
	EmailAddresses []string

	//Output
	NumOfSupressedEmailAddresses int
}

type TestWebhook added in v0.20.0

type TestWebhook struct {
	ID int

	Result *dto.WebhookTriggerResult
}

type ToggleCommentReaction added in v0.23.0

type ToggleCommentReaction struct {
	Comment *entity.Comment
	Emoji   string
	User    *entity.User
	Result  bool
}

type TriggerWebhooks added in v0.20.0

type TriggerWebhooks struct {
	Type  enum.WebhookType
	Props webhook.Props
}

type TrustUser added in v0.33.0

type TrustUser struct {
	UserID int
}

type UnassignTag

type UnassignTag struct {
	Tag  *entity.Tag
	Post *entity.Post
}

type UnblockUser

type UnblockUser struct {
	UserID int
}

type UntrustUser added in v0.33.0

type UntrustUser struct {
	UserID int
}

type UpdateComment

type UpdateComment struct {
	CommentID int
	Content   string
}

type UpdateCurrentUser

type UpdateCurrentUser struct {
	Name       string
	AvatarType enum.AvatarType
	Avatar     *dto.ImageUpload
}

type UpdateCurrentUserSettings

type UpdateCurrentUserSettings struct {
	Settings map[string]string
}

type UpdatePost

type UpdatePost struct {
	Post        *entity.Post
	Title       string
	Description string

	Result *entity.Post
}

type UpdateTag

type UpdateTag struct {
	TagID    int
	Name     string
	Color    string
	IsPublic bool

	Result *entity.Tag
}

type UpdateTenantAdvancedSettings

type UpdateTenantAdvancedSettings struct {
	CustomCSS      string
	AllowedSchemes string
}

type UpdateTenantEmailAuthAllowedSettings added in v0.19.0

type UpdateTenantEmailAuthAllowedSettings struct {
	IsEmailAuthAllowed bool
}

type UpdateTenantPrivacySettings

type UpdateTenantPrivacySettings struct {
	IsPrivate           bool
	IsFeedEnabled       bool
	IsModerationEnabled bool
}

type UpdateTenantSettings

type UpdateTenantSettings struct {
	Title               string
	Invitation          string
	WelcomeMessage      string
	WelcomeHeader       string
	DescriptionTemplate string
	CNAME               string
	Locale              string
}

type UploadImage

type UploadImage struct {
	Image  *dto.ImageUpload
	Folder string
}

type UploadImages

type UploadImages struct {
	Images []*dto.ImageUpload
	Folder string
}

type UserListCreateCompany added in v0.23.0

type UserListCreateCompany struct {
	Name       string
	TenantId   int
	SignedUpAt string
	Plan       enum.Plan
	Subdomain  string
	UserId     int
	UserEmail  string
	UserName   string
}

type UserListHandleRoleChange added in v0.23.0

type UserListHandleRoleChange struct {
	Id   int
	Role enum.Role
}

type UserListUpdateCompany added in v0.23.0

type UserListUpdateCompany struct {
	TenantId int
	Name     string
	Plan     enum.Plan
}

type UserListUpdateUser added in v0.23.0

type UserListUpdateUser struct {
	Id       int
	TenantId int
	Email    string
	Name     string
}

Jump to

Keyboard shortcuts

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