types

package
v0.0.0-...-39e015a Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: AGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptProjectInviteRequest

type AcceptProjectInviteRequest struct {
	WithSession
	ProjectId sharedTypes.UUID    `json:"-"`
	Token     projectInvite.Token `json:"-"`
}

type AcceptProjectInviteResponse

type AcceptProjectInviteResponse = asyncForm.Response

type ActivateUserPageRequest

type ActivateUserPageRequest struct {
	WithSession
	UserIdHex string                    `form:"user_id"`
	Token     oneTimeToken.OneTimeToken `form:"token"`
}

func (*ActivateUserPageRequest) FromQuery

func (r *ActivateUserPageRequest) FromQuery(q url.Values) error

func (*ActivateUserPageRequest) Validate

func (r *ActivateUserPageRequest) Validate() error

type ActivateUserPageResponse

type ActivateUserPageResponse struct {
	Data     *templates.UserActivateData
	Redirect string
}

type AddDocRequest

type AddDocRequest struct {
	WithProjectIdAndUserId
	Name           sharedTypes.Filename `json:"name"`
	ParentFolderId sharedTypes.UUID     `json:"parent_folder_id"`
	ClientId       sharedTypes.PublicId `json:"clientId"`
}

func (*AddDocRequest) Validate

func (r *AddDocRequest) Validate() error

type AddDocResponse

type AddDocResponse = project.Doc

type AddFolderRequest

type AddFolderRequest struct {
	WithProjectIdAndUserId
	Name           sharedTypes.Filename `json:"name"`
	ParentFolderId sharedTypes.UUID     `json:"parent_folder_id"`
}

type AddFolderResponse

type AddFolderResponse = project.Folder

type AddHeaderFn

type AddHeaderFn = func(s sharedTypes.Snapshot) sharedTypes.Snapshot

type AddProjectToTagRequest

type AddProjectToTagRequest struct {
	WithSession
	ProjectId sharedTypes.UUID `json:"-"`
	TagId     sharedTypes.UUID `json:"-"`
}

type AddProjectsToTagRequest

type AddProjectsToTagRequest struct {
	WithSession
	ProjectIds []sharedTypes.UUID `json:"projectIds"`
	TagId      sharedTypes.UUID   `json:"-"`
}

type ArchiveProjectRequest

type ArchiveProjectRequest struct {
	WithSession

	ProjectId sharedTypes.UUID `json:"-"`
}

type BetaProgramParticipatePageRequest

type BetaProgramParticipatePageRequest struct {
	WithSession
}

type BetaProgramParticipatePageResponse

type BetaProgramParticipatePageResponse struct {
	Data *templates.BetaProgramParticipate
}

type CMDCreateUserRequest

type CMDCreateUserRequest struct {
	Email       sharedTypes.Email
	InitiatorId sharedTypes.UUID
	// contains filtered or unexported fields
}

func NewCMDCreateUserRequest

func NewCMDCreateUserRequest(email sharedTypes.Email, adminUserId sharedTypes.UUID) CMDCreateUserRequest

func (*CMDCreateUserRequest) Preprocess

func (r *CMDCreateUserRequest) Preprocess()

func (*CMDCreateUserRequest) Validate

func (r *CMDCreateUserRequest) Validate() error

type CMDCreateUserResponse

type CMDCreateUserResponse struct {
	SetNewPasswordURL *sharedTypes.URL
}

type ChangeEmailAddressRequest

type ChangeEmailAddressRequest struct {
	WithSession
	IPAddress string `json:"-"`

	Email sharedTypes.Email `json:"email"`
}

func (*ChangeEmailAddressRequest) Preprocess

func (r *ChangeEmailAddressRequest) Preprocess()

func (*ChangeEmailAddressRequest) Validate

func (r *ChangeEmailAddressRequest) Validate() error

type ChangePasswordRequest

type ChangePasswordRequest struct {
	WithSession
	IPAddress string `json:"-"`

	CurrentPassword    UserPassword `json:"currentPassword"`
	NewPassword        UserPassword `json:"newPassword1"`
	NewPasswordConfirm UserPassword `json:"newPassword2"`
}

func (*ChangePasswordRequest) Validate

func (r *ChangePasswordRequest) Validate() error

type ChangePasswordResponse

type ChangePasswordResponse = asyncForm.Response

type ClearCompileCacheRequest

type ClearCompileCacheRequest struct {
	sharedTypes.ProjectOptions `json:"-"`
	ClsiServerId               ClsiServerId `json:"clsiServerId"`
}

type ClearSessionsRequest

type ClearSessionsRequest struct {
	WithSession
	IPAddress string `json:"-"`
}

type CloneProjectRequest

type CloneProjectRequest struct {
	WithSession
	ProjectId sharedTypes.UUID `json:"-"`
	Name      project.Name     `json:"projectName"`
}

type CloneProjectResponse

type CloneProjectResponse = CreateProjectResponse

type ClsiServerId

type ClsiServerId string

type CompileProjectHeadlessRequest

type CompileProjectHeadlessRequest struct {
	WithSession
	ProjectId sharedTypes.UUID `json:"-"`
	UserId    sharedTypes.UUID `json:"-"`
}

type CompileProjectRequest

type CompileProjectRequest struct {
	sharedTypes.ProjectOptions `json:"-"`

	CheckMode                  clsiTypes.CheckMode     `json:"checkMode"`
	Compiler                   sharedTypes.Compiler    `json:"compiler"`
	ImageName                  sharedTypes.ImageName   `json:"imageName"`
	RootDocId                  sharedTypes.UUID        `json:"rootDocId"`
	RootDocPath                sharedTypes.PathName    `json:"rootDocPath"`
	SyncState                  clsiTypes.SyncState     `json:"syncState"`
	AutoCompile                bool                    `json:"autoCompile"`
	Draft                      clsiTypes.DraftModeFlag `json:"draft"`
	IncrementalCompilesEnabled bool                    `json:"incrementalCompilesEnabled"`
}

func (*CompileProjectRequest) Validate

func (r *CompileProjectRequest) Validate() error

type CompileProjectResponse

type CompileProjectResponse struct {
	clsiTypes.CompileResponse
	ClsiServerId      ClsiServerId             `json:"clsiServerId,omitempty"`
	CompileGroup      sharedTypes.CompileGroup `json:"compileGroup,omitempty"`
	PDFDownloadDomain PDFDownloadDomain        `json:"pdfDownloadDomain,omitempty"`
}

type ConfirmEmailPageRequest

type ConfirmEmailPageRequest struct {
	WithSession
	Token oneTimeToken.OneTimeToken `form:"token"`
}

func (*ConfirmEmailPageRequest) FromQuery

func (r *ConfirmEmailPageRequest) FromQuery(q url.Values) error

func (*ConfirmEmailPageRequest) Validate

func (r *ConfirmEmailPageRequest) Validate() error

type ConfirmEmailPageResponse

type ConfirmEmailPageResponse struct {
	Data *templates.UserConfirmEmailData
}

type ConfirmEmailRequest

type ConfirmEmailRequest struct {
	Token oneTimeToken.OneTimeToken `json:"token"`
}

func (*ConfirmEmailRequest) Validate

func (r *ConfirmEmailRequest) Validate() error

type CreateExampleProjectRequest

type CreateExampleProjectRequest struct {
	WithSession
	Name     project.Name `json:"projectName"`
	Template string       `json:"template"`
}

type CreateExampleProjectResponse

type CreateExampleProjectResponse = CreateProjectResponse

type CreateLinkedFileProviderParameter

type CreateLinkedFileProviderParameter struct {
	ClsiServerId         ClsiServerId         `json:"clsiServerId"`
	BuildId              clsiTypes.BuildId    `json:"build_id"`
	SourceProjectId      sharedTypes.UUID     `json:"source_project_id"`
	SourceEntityPath     sharedTypes.PathName `json:"source_entity_path"`
	SourceOutputFilePath sharedTypes.PathName `json:"source_output_file_path"`
	URL                  *sharedTypes.URL     `json:"url"`
}

type CreateLinkedFileRequest

type CreateLinkedFileRequest struct {
	WithProjectIdAndUserId
	ParentFolderId sharedTypes.UUID                  `json:"parent_folder_id"`
	Name           sharedTypes.Filename              `json:"name"`
	Provider       project.LinkedFileProvider        `json:"provider"`
	Parameter      CreateLinkedFileProviderParameter `json:"data"`
	ClientId       sharedTypes.PublicId              `json:"clientId"`
}

func (*CreateLinkedFileRequest) LinkedFileData

func (r *CreateLinkedFileRequest) LinkedFileData() *project.LinkedFileData

func (*CreateLinkedFileRequest) Validate

func (r *CreateLinkedFileRequest) Validate() error

type CreateMultiProjectZIPRequest

type CreateMultiProjectZIPRequest struct {
	WithSession
	ProjectIds []sharedTypes.UUID `json:"-"`
}

func (*CreateMultiProjectZIPRequest) FromQuery

func (r *CreateMultiProjectZIPRequest) FromQuery(q url.Values) error

func (*CreateMultiProjectZIPRequest) Validate

func (r *CreateMultiProjectZIPRequest) Validate() error

type CreateProjectFile

type CreateProjectFile interface {
	Size() int64
	Path() sharedTypes.PathName
	Open() (io.ReadCloser, bool, error)
	PreComputedHash() sharedTypes.Hash
	SourceElement() project.TreeElement
}

type CreateProjectFileWithCleanup

type CreateProjectFileWithCleanup interface {
	CreateProjectFile
	Cleanup()
}

type CreateProjectFromZipRequest

type CreateProjectFromZipRequest struct {
	WithSession
	AddHeader      AddHeaderFn          `json:"-"`
	Compiler       sharedTypes.Compiler `json:"-"`
	HasDefaultName bool                 `json:"-"`
	Name           project.Name         `json:"-"`
	UploadDetails
}

func (*CreateProjectFromZipRequest) Preprocess

func (r *CreateProjectFromZipRequest) Preprocess()

func (*CreateProjectFromZipRequest) Validate

func (r *CreateProjectFromZipRequest) Validate() error

type CreateProjectInviteRequest

type CreateProjectInviteRequest struct {
	WithProjectIdAndUserId
	Email          sharedTypes.Email          `json:"email"`
	PrivilegeLevel sharedTypes.PrivilegeLevel `json:"privileges"`
}

func (*CreateProjectInviteRequest) Preprocess

func (r *CreateProjectInviteRequest) Preprocess()

func (*CreateProjectInviteRequest) Validate

func (r *CreateProjectInviteRequest) Validate() error

type CreateProjectRequest

type CreateProjectRequest struct {
	AddHeader          AddHeaderFn
	Compiler           sharedTypes.Compiler
	ExtraFolders       []sharedTypes.DirName
	Files              []CreateProjectFile
	HasDefaultName     bool
	ImageName          sharedTypes.ImageName
	Name               project.Name
	RootDocPath        sharedTypes.PathName
	SourceProjectId    sharedTypes.UUID
	SpellCheckLanguage spellingTypes.SpellCheckLanguage
	UserId             sharedTypes.UUID
}

func (*CreateProjectRequest) Validate

func (r *CreateProjectRequest) Validate() error

type CreateProjectResponse

type CreateProjectResponse struct {
	Success   bool              `json:"success"`
	Error     string            `json:"error,omitempty"`
	ProjectId *sharedTypes.UUID `json:"project_id,omitempty"`
	Name      project.Name      `json:"name,omitempty"`
}

type CreateProjectZIPRequest

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

type CreateProjectZIPResponse

type CreateProjectZIPResponse struct {
	Filename sharedTypes.Filename `json:"-"`
	FSPath   string
}

func (*CreateProjectZIPResponse) Cleanup

func (r *CreateProjectZIPResponse) Cleanup()

type CreateTagRequest

type CreateTagRequest struct {
	WithSession
	Name string `json:"name"`
}

type CreateTagResponse

type CreateTagResponse = tag.Full

type DeleteDocRequest

type DeleteDocRequest struct {
	WithProjectIdAndUserId
	DocId sharedTypes.UUID `json:"-"`
}

type DeleteFileRequest

type DeleteFileRequest struct {
	WithProjectIdAndUserId
	FileId sharedTypes.UUID `json:"-"`
}

type DeleteFolderRequest

type DeleteFolderRequest struct {
	WithProjectIdAndUserId
	FolderId sharedTypes.UUID `json:"-"`
}

type DeleteProjectRequest

type DeleteProjectRequest struct {
	WithSession
	ProjectId sharedTypes.UUID `json:"-"`
	IPAddress string           `json:"-"`
	EpochHint *int64           `json:"-"`
}

type DeleteTagRequest

type DeleteTagRequest struct {
	WithSession
	TagId sharedTypes.UUID `json:"-"`
}

type DeleteUserRequest

type DeleteUserRequest struct {
	WithSession
	IPAddress string       `json:"-"`
	Password  UserPassword `json:"password"`
}

type EmailOptions

type EmailOptions struct {
	Public *email.PublicOptions
	Send   *email.SendOptions
}

type GetAccessTokensRequest

type GetAccessTokensRequest struct {
	WithProjectIdAndUserId
}

type GetAccessTokensResponse

type GetAccessTokensResponse struct {
	Tokens *project.Tokens `json:"tokens,omitempty"`
}

type GetDictionaryRequest

type GetDictionaryRequest struct {
	WithSession
}

type GetDictionaryResponse

type GetDictionaryResponse struct {
	Words []string `json:"words"`
}

type GetLoggedInUserJWTRequest

type GetLoggedInUserJWTRequest struct {
	WithSession
}

type GetLoggedInUserJWTResponse

type GetLoggedInUserJWTResponse string

type GetMetadataForDocRequest

type GetMetadataForDocRequest struct {
	ProjectId sharedTypes.UUID `json:"-"`
	DocId     sharedTypes.UUID `json:"-"`
	Broadcast bool             `json:"broadcast"`
}

type GetMetadataForDocResponse

type GetMetadataForDocResponse struct {
	DocId              sharedTypes.UUID    `json:"docId"`
	ProjectDocMetadata *ProjectDocMetadata `json:"meta,omitempty"`
}

type GetMetadataForProjectRequest

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

type GetMetadataForProjectResponse

type GetMetadataForProjectResponse struct {
	ProjectMetadata ProjectMetadata `json:"projectMeta"`
}

type GetNotificationsRequest

type GetNotificationsRequest struct {
	WithSession
}

type GetNotificationsResponse

type GetNotificationsResponse = []notification.Notification

type GetProjectChatMessagesRequest

type GetProjectChatMessagesRequest struct {
	ProjectId sharedTypes.UUID      `form:"-"`
	Before    sharedTypes.Timestamp `form:"before"`
}

func (*GetProjectChatMessagesRequest) FromQuery

type GetProjectChatMessagesResponse

type GetProjectChatMessagesResponse = []message.Message

type GetProjectEntitiesRequest

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

type GetProjectEntitiesResponse

type GetProjectEntitiesResponse struct {
	Entities []project.TreeEntity `json:"entities"`
}

type GetProjectFileRequest

type GetProjectFileRequest struct {
	WithSession
	ProjectId sharedTypes.UUID `json:"-"`
	FileId    sharedTypes.UUID `json:"-"`
}

type GetProjectFileResponse

type GetProjectFileResponse struct {
	Filename sharedTypes.Filename `json:"-"`
	Reader   io.ReadSeekCloser    `json:"-"`
	Size     int64                `json:"-"`
}

type GetProjectFileSizeRequest

type GetProjectFileSizeRequest struct {
	WithSession
	ProjectId sharedTypes.UUID `json:"-"`
	FileId    sharedTypes.UUID `json:"-"`
}

type GetProjectFileSizeResponse

type GetProjectFileSizeResponse struct {
	Filename sharedTypes.Filename `json:"-"`
	Size     int64                `json:"-"`
}

type GetProjectJWTRequest

type GetProjectJWTRequest struct {
	WithSession

	ProjectId sharedTypes.UUID `json:"-"`
}

type GetProjectJWTResponse

type GetProjectJWTResponse string

type GetUserContactsRequest

type GetUserContactsRequest struct {
	WithSession
}

type GetUserContactsResponse

type GetUserContactsResponse struct {
	Contacts []UserContact `json:"contacts"`
}

type GetUserProjectsEntry

type GetUserProjectsEntry struct {
	Id   sharedTypes.UUID `json:"_id"`
	Name project.Name     `json:"name"`
}

type GetUserProjectsRequest

type GetUserProjectsRequest struct {
	WithSession
}

type GetUserProjectsResponse

type GetUserProjectsResponse struct {
	Projects []GetUserProjectsEntry `json:"projects"`
}

type GrantTokenAccessRequest

type GrantTokenAccessRequest struct {
	WithSession
	Token project.AccessToken `json:"-"`
}

type GrantTokenAccessResponse

type GrantTokenAccessResponse = asyncForm.Response

type HomepageRequest

type HomepageRequest struct {
	WithSession
}

type LatexLabel

type LatexLabel string

type LatexPackageName

type LatexPackageName string

type LatexPackages

type LatexPackages map[LatexPackageName][]SuggestedLatexCommand

type LearnImageRequest

type LearnImageRequest struct {
	Path sharedTypes.PathName `form:"-"`
}

type LearnImageResponse

type LearnImageResponse struct {
	FSPath string
	Age    int64
}

type LearnPageRequest

type LearnPageRequest struct {
	WithSession
	Section         string `form:"-"`
	SubSection      string `form:"-"`
	Page            string `form:"-"`
	HasQuestionMark bool   `form:"-"`
}

func (*LearnPageRequest) EscapedPath

func (r *LearnPageRequest) EscapedPath() string

func (*LearnPageRequest) Path

func (r *LearnPageRequest) Path() string

func (*LearnPageRequest) Preprocess

func (r *LearnPageRequest) Preprocess()

func (*LearnPageRequest) Validate

func (r *LearnPageRequest) Validate() error

func (*LearnPageRequest) WikiPage

func (r *LearnPageRequest) WikiPage() string

type LearnPageResponse

type LearnPageResponse struct {
	Redirect string
	Age      int64
	Data     *templates.LearnPageData
}

type LearnWordRequest

type LearnWordRequest struct {
	WithSession
	Word string `json:"word"`
}

func (*LearnWordRequest) Validate

func (r *LearnWordRequest) Validate() error

type LeaveProjectRequest

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

type LightDocProjectMetadata

type LightDocProjectMetadata struct {
	Labels       []LatexLabel       `json:"labels"`
	PackageNames []LatexPackageName `json:"packageNames"`
}

type LightProjectMetadata

type LightProjectMetadata map[string]LightDocProjectMetadata

type ListProjectInvitesRequest

type ListProjectInvitesRequest struct {
	WithProjectIdAndUserId
}

type ListProjectInvitesResponse

type ListProjectInvitesResponse struct {
	Invites []projectInvite.ForListing `json:"invites"`
}

type ListProjectMembersRequest

type ListProjectMembersRequest struct {
	WithProjectIdAndUserId
}

type ListProjectMembersResponse

type ListProjectMembersResponse struct {
	Members []user.AsProjectMember `json:"members"`
}

type LoginPageRequest

type LoginPageRequest struct {
	WithSession
	Referrer string `form:"-"`
}

type LoginPageResponse

type LoginPageResponse struct {
	Data     *templates.UserLoginData
	Redirect string
}

type LoginRequest

type LoginRequest struct {
	WithSession
	IPAddress string            `json:"-"`
	Email     sharedTypes.Email `json:"email"`
	Password  UserPassword      `json:"password"`
}

func (*LoginRequest) Preprocess

func (r *LoginRequest) Preprocess()

func (*LoginRequest) Validate

func (r *LoginRequest) Validate() error

type LoginResponse

type LoginResponse = asyncForm.Response

type LogoutPageRequest

type LogoutPageRequest struct {
	WithSession
}

type LogoutPageResponse

type LogoutPageResponse struct {
	Data *templates.UserLogoutData
}

type LogoutRequest

type LogoutRequest struct {
	WithSession
}

type LogoutResponse

type LogoutResponse = asyncForm.Response

type MoveDocRequest

type MoveDocRequest struct {
	WithProjectIdAndUserId
	DocId          sharedTypes.UUID `json:"-"`
	TargetFolderId sharedTypes.UUID `json:"folder_id"`
}

type MoveFileRequest

type MoveFileRequest struct {
	WithProjectIdAndUserId
	FileId         sharedTypes.UUID `json:"-"`
	TargetFolderId sharedTypes.UUID `json:"folder_id"`
}

type MoveFolderRequest

type MoveFolderRequest struct {
	WithProjectIdAndUserId
	FolderId       sharedTypes.UUID `json:"-"`
	TargetFolderId sharedTypes.UUID `json:"folder_id"`
}

type OpenInOverleafDocumentationPageRequest

type OpenInOverleafDocumentationPageRequest struct {
	WithSession
}

type OpenInOverleafDocumentationPageResponse

type OpenInOverleafDocumentationPageResponse struct {
	Data *templates.OpenInOverleafDocumentationData
}

type OpenInOverleafGatewayPageRequest

type OpenInOverleafGatewayPageRequest struct {
	WithSession
	Query url.Values      `form:"-"`
	Body  json.RawMessage `form:"-"`
}

type OpenInOverleafGatewayPageResponse

type OpenInOverleafGatewayPageResponse struct {
	Data *templates.OpenInOverleafGatewayData
}

type OpenInOverleafRequest

type OpenInOverleafRequest struct {
	WithSession

	Compiler       sharedTypes.Compiler    `json:"compiler"`
	HasDefaultName bool                    `json:"-"`
	ProjectName    project.Name            `json:"project_name"`
	Snippets       []OpenInOverleafSnippet `json:"snippets"`
	ZipURL         *sharedTypes.URL        `json:"zip_url"`
}

func (*OpenInOverleafRequest) PopulateFromParams

func (r *OpenInOverleafRequest) PopulateFromParams(params url.Values) error

func (*OpenInOverleafRequest) Preprocess

func (r *OpenInOverleafRequest) Preprocess()

func (*OpenInOverleafRequest) Validate

func (r *OpenInOverleafRequest) Validate() error

type OpenInOverleafSnippet

type OpenInOverleafSnippet struct {
	File     CreateProjectFileWithCleanup `json:"-"`
	Path     sharedTypes.PathName         `json:"path"`
	Snapshot sharedTypes.Snapshot         `json:"snapshot"`
	URL      *sharedTypes.URL             `json:"url"`
}

func (*OpenInOverleafSnippet) Validate

func (s *OpenInOverleafSnippet) Validate() error

type OptInBetaProgramRequest

type OptInBetaProgramRequest struct {
	WithSession
}

type OptOutBetaProgramRequest

type OptOutBetaProgramRequest struct {
	WithSession
}

type Options

type Options struct {
	AdminEmail        sharedTypes.Email            `json:"admin_email"`
	AllowedImages     []sharedTypes.ImageName      `json:"allowed_images"`
	AllowedImageNames []templates.AllowedImageName `json:"allowed_image_names"`
	AppName           string                       `json:"app_name"`
	BcryptCost        int                          `json:"bcrypt_cost"`
	CDNURL            sharedTypes.URL              `json:"cdn_url"`
	CSPReportURL      *sharedTypes.URL             `json:"csp_report_url"`
	DefaultImage      sharedTypes.ImageName        `json:"default_image"`
	Email             struct {
		CustomFooter     string            `json:"custom_footer"`
		CustomFooterHTML template.HTML     `json:"custom_footer_html"`
		From             email.Identity    `json:"from"`
		FallbackReplyTo  email.Identity    `json:"fallback_reply_to"`
		SMTPAddress      email.SMTPAddress `json:"smtp_address"`
		SMTPHello        string            `json:"smtp_hello"`
		SMTPIdentity     string            `json:"smtp_identity"`
		SMTPUser         string            `json:"smtp_user"`
		SMTPPassword     string            `json:"smtp_password"`
	} `json:"email"`
	I18n                templates.I18nOptions `json:"i18n"`
	LearnCacheDuration  time.Duration         `json:"learn_cache_duration"`
	LearnImageCacheBase sharedTypes.DirName   `json:"learn_image_cache_base"`
	ManifestPath        string                `json:"manifest_path"`
	Nav                 templates.NavOptions  `json:"nav"`
	PDFDownloadDomain   PDFDownloadDomain     `json:"pdf_download_domain"`
	Sentry              SentryOptions         `json:"sentry"`
	SiteURL             sharedTypes.URL       `json:"site_url"`
	SmokeTest           struct {
		Email     sharedTypes.Email `json:"email"`
		Password  UserPassword      `json:"password"`
		ProjectId sharedTypes.UUID  `json:"projectId"`
		UserId    sharedTypes.UUID  `json:"userId"`
	} `json:"smoke_test"`
	StatusPageURL             *sharedTypes.URL      `json:"status_page_url"`
	TeXLiveImageNameOverride  sharedTypes.ImageName `json:"texlive_image_name_override"`
	EmailConfirmationDisabled bool                  `json:"email_confirmation_disabled"`
	RegistrationDisabled      bool                  `json:"registration_disabled"`
	RobotsNoindex             bool                  `json:"robots_noindex"`
	WatchManifest             bool                  `json:"watch_manifest"`

	APIs struct {
		Clsi struct {
			URL         sharedTypes.URL `json:"url"`
			Persistence struct {
				CookieName string        `json:"cookie_name"`
				TTL        time.Duration `json:"ttl"`
			} `json:"persistence"`
		} `json:"clsi"`
		Filestore      objectStorage.Options `json:"filestore"`
		LinkedURLProxy struct {
			Chain []sharedTypes.URL `json:"chain"`
		} `json:"linked_url_proxy"`
	} `json:"apis"`

	JWT struct {
		Project      jwtOptions.JWTOptions `json:"project"`
		LoggedInUser jwtOptions.JWTOptions `json:"logged_in_user"`
	} `json:"jwt"`

	SessionCookie signedCookie.Options `json:"session_cookie"`

	RateLimits struct {
		LinkSharingTokenLookupConcurrency int64 `json:"link_sharing_token_lookup_concurrency"`
	} `json:"rate_limits"`
}

func (*Options) AssetsOptions

func (o *Options) AssetsOptions() assets.Options

func (*Options) EmailOptions

func (o *Options) EmailOptions() *EmailOptions

func (*Options) FillFromEnv

func (o *Options) FillFromEnv()

func (*Options) PublicSettings

func (o *Options) PublicSettings() (*templates.PublicSettings, error)

func (*Options) Validate

func (o *Options) Validate() error

type PDFDownloadDomain

type PDFDownloadDomain string

type ProjectDocMetadata

type ProjectDocMetadata struct {
	Labels   []LatexLabel  `json:"labels"`
	Packages LatexPackages `json:"packages"`
}

type ProjectEditorDetachedPageRequest

type ProjectEditorDetachedPageRequest struct {
	ProjectId sharedTypes.UUID `form:"-"`
	WithSession
}

type ProjectEditorDetachedPageResponse

type ProjectEditorDetachedPageResponse struct {
	Data *templates.ProjectEditorDetachedData
}

type ProjectEditorPageRequest

type ProjectEditorPageRequest struct {
	ProjectId  sharedTypes.UUID     `form:"-"`
	DetachRole templates.DetachRole `json:"detachRole"`
	WithSession
}

func (*ProjectEditorPageRequest) Validate

func (r *ProjectEditorPageRequest) Validate() error

type ProjectEditorPageResponse

type ProjectEditorPageResponse struct {
	Data *templates.ProjectEditorData
}

type ProjectListPageRequest

type ProjectListPageRequest struct {
	WithSession
}

type ProjectListPageResponse

type ProjectListPageResponse struct {
	Data *templates.ProjectListData
}

type ProjectMetadata

type ProjectMetadata map[string]ProjectDocMetadata

type ReconfirmAccountPageRequest

type ReconfirmAccountPageRequest struct {
	WithSession
}

type ReconfirmAccountPageResponse

type ReconfirmAccountPageResponse struct {
	Data     *templates.UserReconfirmData
	Redirect string
}

type RefreshLinkedFileRequest

type RefreshLinkedFileRequest struct {
	WithProjectIdAndUserId
	ParentFolderId sharedTypes.UUID     `json:"-"`
	File           project.FileRef      `json:"-"`
	ClientId       sharedTypes.PublicId `json:"clientId"`
}

type RegisterUserPageRequest

type RegisterUserPageRequest struct {
	WithSession
	templates.SharedProjectData
}

type RegisterUserPageResponse

type RegisterUserPageResponse struct {
	Data     *templates.UserRegisterData
	Redirect string
}

type RegisterUserRequest

type RegisterUserRequest struct {
	WithSession
	IPAddress string `json:"-"`

	Email    sharedTypes.Email `json:"email"`
	Password UserPassword      `json:"password"`
}

func (*RegisterUserRequest) Preprocess

func (r *RegisterUserRequest) Preprocess()

func (*RegisterUserRequest) Validate

func (r *RegisterUserRequest) Validate() error

type RegisterUserResponse

type RegisterUserResponse = asyncForm.Response

type RemoveNotificationRequest

type RemoveNotificationRequest struct {
	WithSession
	NotificationId sharedTypes.UUID `json:"-"`
}

type RemoveProjectMemberRequest

type RemoveProjectMemberRequest struct {
	WithProjectIdAndUserId
	MemberId sharedTypes.UUID `json:"-"`
}

type RemoveProjectToTagRequest

type RemoveProjectToTagRequest struct {
	WithSession
	ProjectId sharedTypes.UUID `json:"-"`
	TagId     sharedTypes.UUID `json:"-"`
}

type RemoveProjectsToTagRequest

type RemoveProjectsToTagRequest struct {
	WithSession
	ProjectIds []sharedTypes.UUID `json:"projectIds"`
	TagId      sharedTypes.UUID   `json:"-"`
}

type RenameDocRequest

type RenameDocRequest struct {
	WithProjectIdAndUserId
	DocId sharedTypes.UUID     `json:"-"`
	Name  sharedTypes.Filename `json:"name"`
}

type RenameFileRequest

type RenameFileRequest struct {
	WithProjectIdAndUserId
	FileId sharedTypes.UUID     `json:"-"`
	Name   sharedTypes.Filename `json:"name"`
}

type RenameFolderRequest

type RenameFolderRequest struct {
	WithProjectIdAndUserId
	FolderId sharedTypes.UUID     `json:"-"`
	Name     sharedTypes.Filename `json:"name"`
}

type RenameProjectRequest

type RenameProjectRequest struct {
	WithSession
	ProjectId sharedTypes.UUID `json:"-"`
	Name      project.Name     `json:"newProjectName"`
}

type RenameTagRequest

type RenameTagRequest struct {
	WithSession
	TagId sharedTypes.UUID `json:"-"`
	Name  string           `json:"name"`
}

type RequestPasswordResetPageRequest

type RequestPasswordResetPageRequest struct {
	WithSession
	Email sharedTypes.Email `form:"email"`
}

func (*RequestPasswordResetPageRequest) FromQuery

type RequestPasswordResetPageResponse

type RequestPasswordResetPageResponse struct {
	Data     *templates.UserPasswordResetData
	Redirect string
}

type RequestPasswordResetRequest

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

func (*RequestPasswordResetRequest) Preprocess

func (r *RequestPasswordResetRequest) Preprocess()

func (*RequestPasswordResetRequest) Validate

func (r *RequestPasswordResetRequest) Validate() error

type ResendEmailConfirmationRequest

type ResendEmailConfirmationRequest struct {
	WithSession

	Email sharedTypes.Email `json:"email"`
}

func (*ResendEmailConfirmationRequest) Preprocess

func (r *ResendEmailConfirmationRequest) Preprocess()

func (*ResendEmailConfirmationRequest) Validate

func (r *ResendEmailConfirmationRequest) Validate() error

type ResendProjectInviteRequest

type ResendProjectInviteRequest struct {
	WithProjectIdAndUserId
	InviteId sharedTypes.UUID `json:"-"`
}

type RestoreDeletedDocRequest

type RestoreDeletedDocRequest struct {
	WithProjectIdAndUserId
	DocId sharedTypes.UUID     `json:"-"`
	Name  sharedTypes.Filename `json:"name"`
}

type RestoreDeletedDocResponse

type RestoreDeletedDocResponse struct {
	DocId sharedTypes.UUID `json:"doc_id"`
}

type RestrictedPageRequest

type RestrictedPageRequest struct {
	WithSession
}

type RevokeProjectInviteRequest

type RevokeProjectInviteRequest struct {
	WithProjectIdAndUserId
	InviteId sharedTypes.UUID `json:"-"`
}

type SendProjectChatMessageRequest

type SendProjectChatMessageRequest struct {
	ProjectId sharedTypes.UUID `json:"-"`
	UserId    sharedTypes.UUID `json:"-"`
	Content   string           `json:"content"`
}

type SentryOptions

type SentryOptions struct {
	Frontend templates.SentryFrontendOptions `json:"frontend"`
}

type SessionsPageRequest

type SessionsPageRequest struct {
	WithSession
}

type SessionsPageResponse

type SessionsPageResponse struct {
	Data *templates.UserSessionsData
}

type SetCompilerRequest

type SetCompilerRequest struct {
	WithProjectIdAndUserId
	Compiler sharedTypes.Compiler `json:"compiler"`
}

type SetImageNameRequest

type SetImageNameRequest struct {
	WithProjectIdAndUserId
	ImageName sharedTypes.ImageName `json:"imageName"`
}

type SetMemberPrivilegeLevelInProjectRequest

type SetMemberPrivilegeLevelInProjectRequest struct {
	WithProjectIdAndUserId
	MemberId       sharedTypes.UUID           `json:"-"`
	PrivilegeLevel sharedTypes.PrivilegeLevel `json:"privilegeLevel"`
}

type SetPasswordPageRequest

type SetPasswordPageRequest struct {
	WithSession
	Email sharedTypes.Email         `form:"email"`
	Token oneTimeToken.OneTimeToken `form:"passwordResetToken"`
}

func (*SetPasswordPageRequest) FromQuery

func (r *SetPasswordPageRequest) FromQuery(q url.Values) error

type SetPasswordPageResponse

type SetPasswordPageResponse struct {
	Data     *templates.UserSetPasswordData
	Redirect string
}

type SetPasswordRequest

type SetPasswordRequest struct {
	WithSession
	IPAddress string `json:"-"`

	Token    oneTimeToken.OneTimeToken `json:"passwordResetToken"`
	Password UserPassword              `json:"password"`
}

type SetPasswordResponse

type SetPasswordResponse = asyncForm.Response

type SetPublicAccessLevelRequest

type SetPublicAccessLevelRequest struct {
	WithProjectIdAndUserId
	PublicAccessLevel project.PublicAccessLevel `json:"publicAccessLevel"`
}

type SetPublicAccessLevelResponse

type SetPublicAccessLevelResponse struct {
	Tokens *project.Tokens `json:"tokens,omitempty"`
}

type SetRootDocIdRequest

type SetRootDocIdRequest struct {
	WithProjectIdAndUserId
	RootDocId sharedTypes.UUID `json:"rootDocId"`
}

type SetSpellCheckLanguageRequest

type SetSpellCheckLanguageRequest struct {
	WithProjectIdAndUserId
	SpellCheckLanguage spellingTypes.SpellCheckLanguage `json:"spellCheckLanguage"`
}

type SetUserName

type SetUserName struct {
	WithSession

	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
}

type SettingsPageRequest

type SettingsPageRequest struct {
	WithSession
}

type SettingsPageResponse

type SettingsPageResponse struct {
	Data *templates.UserSettingsData
}

type SmokeTestResponse

type SmokeTestResponse struct {
	Stats *SmokeTestStats `json:"stats"`
}

type SmokeTestStats

type SmokeTestStats struct {
	Start    time.Time        `json:"start"`
	Steps    []*SmokeTestStep `json:"steps"`
	End      time.Time        `json:"end"`
	Duration string           `json:"duration"`
}

type SmokeTestStep

type SmokeTestStep struct {
	Name     string                          `json:"name"`
	Duration string                          `json:"duration"`
	Action   func(ctx context.Context) error `json:"-"`
}

type SuggestedLatexCommand

type SuggestedLatexCommand struct {
	Caption string  `json:"caption"`
	Snippet string  `json:"snippet"`
	Meta    string  `json:"meta"`
	Score   float64 `json:"score"`
}

type SwitchLanguageRequest

type SwitchLanguageRequest struct {
	WithSession
	Lng      string
	Referrer string
}

func (*SwitchLanguageRequest) FromQuery

func (r *SwitchLanguageRequest) FromQuery(q url.Values) error

type SwitchLanguageResponse

type SwitchLanguageResponse struct {
	Redirect string
}

type SyncFromCodeRequest

type SyncFromCodeRequest struct {
	sharedTypes.ProjectOptions `json:"-"`
	clsiTypes.SyncFromCodeRequest
	ClsiServerId ClsiServerId `json:"clsiServerId"`
}

type SyncFromCodeResponse

type SyncFromCodeResponse = clsiTypes.SyncFromCodeResponse

type SyncFromPDFRequest

type SyncFromPDFRequest struct {
	sharedTypes.ProjectOptions `json:"-"`
	clsiTypes.SyncFromPDFRequest
	ClsiServerId ClsiServerId `json:"clsiServerId"`
}

type SyncFromPDFResponse

type SyncFromPDFResponse = clsiTypes.SyncFromPDFResponse

type TokenAccessPageRequest

type TokenAccessPageRequest struct {
	WithSession

	Token project.AccessToken
}

type TokenAccessPageResponse

type TokenAccessPageResponse struct {
	Data *templates.ProjectTokenAccessData
}

type TransferProjectOwnershipRequest

type TransferProjectOwnershipRequest struct {
	WithProjectIdAndUserId
	NewOwnerId sharedTypes.UUID `json:"user_id"`
}

type TrashProjectRequest

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

type UnArchiveProjectRequest

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

type UnTrashProjectRequest

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

type UnlearnWordRequest

type UnlearnWordRequest struct {
	WithSession
	Word string `json:"word"`
}

func (*UnlearnWordRequest) Validate

func (r *UnlearnWordRequest) Validate() error

type UpdateEditorConfigRequest

type UpdateEditorConfigRequest struct {
	WithSession
	EditorConfig user.EditorConfig `json:"editorConfig"`
}

type UploadDetails

type UploadDetails struct {
	File     multipart.File       `json:"-"`
	FileName sharedTypes.Filename `json:"-"`
	Size     int64                `json:"-"`
}

func (*UploadDetails) SeekFileToStart

func (d *UploadDetails) SeekFileToStart() error

func (*UploadDetails) Validate

func (d *UploadDetails) Validate() error

type UploadFileRequest

type UploadFileRequest struct {
	ProjectId      sharedTypes.UUID        `json:"-"`
	UserId         sharedTypes.UUID        `json:"-"`
	ParentFolderId sharedTypes.UUID        `json:"-"`
	LinkedFileData *project.LinkedFileData `json:"-"`
	ClientId       sharedTypes.PublicId    `json:"-"`
	UploadDetails
}

type UserContact

type UserContact struct {
	user.WithPublicInfoAndNonStandardId
	Type string `json:"type"`
}

type UserPassword

type UserPassword string

func (UserPassword) CheckForEmailMatch

func (p UserPassword) CheckForEmailMatch(email sharedTypes.Email) error

func (UserPassword) Validate

func (p UserPassword) Validate() error

type ViewProjectInvitePageRequest

type ViewProjectInvitePageRequest struct {
	WithSession
	ProjectId sharedTypes.UUID    `form:"-"`
	Token     projectInvite.Token `form:"-"`
	templates.SharedProjectData
}

func (*ViewProjectInvitePageRequest) Validate

func (r *ViewProjectInvitePageRequest) Validate() error

type ViewProjectInvitePageResponse

type ViewProjectInvitePageResponse struct {
	Data     *templates.ProjectViewInviteData
	Redirect string
}

type WithProjectIdAndUserId

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

func (*WithProjectIdAndUserId) FromSignedProjectOptions

func (w *WithProjectIdAndUserId) FromSignedProjectOptions(o sharedTypes.ProjectOptions)

type WithSession

type WithSession struct {
	Session *session.Session `json:"-"`
}

func (*WithSession) SetSession

func (w *WithSession) SetSession(s *session.Session)

type WordCountRequest

type WordCountRequest struct {
	sharedTypes.ProjectOptions `json:"-"`
	clsiTypes.WordCountRequest
	ClsiServerId ClsiServerId `json:"clsiServerId"`
}

type WordCountResponse

type WordCountResponse = clsiTypes.WordCountResponse

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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