pages

package
v1.11.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Files embed.FS

Functions

func Cache

func Cache(h http.Handler) http.Handler

Types

type BrandParams

type BrandParams struct {
	LoggedInUser *oauth.User
}

type Collaborator

type Collaborator struct {
	Did    string
	Handle string
	Role   string
}

type EditBioParams

type EditBioParams struct {
	LoggedInUser *oauth.User
	Profile      *models.Profile
}

type EditIssueCommentParams

type EditIssueCommentParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Issue        *models.Issue
	Comment      *models.IssueComment
}

type EditIssueParams

type EditIssueParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Issue        *models.Issue
	Action       string
}

type EditLabelPanelParams

type EditLabelPanelParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Defs         map[string]*models.LabelDefinition
	Subject      string
	State        models.LabelState
}

type EditPinsParams

type EditPinsParams struct {
	LoggedInUser *oauth.User
	Profile      *models.Profile
	AllRepos     []PinnedRepo
}

type FollowCard

type FollowCard struct {
	UserDid        string
	LoggedInUser   *oauth.User
	FollowStatus   models.FollowStatus
	FollowersCount int64
	FollowingCount int64
	Profile        *models.Profile
}

type FollowFragmentParams

type FollowFragmentParams struct {
	UserDid      string
	FollowStatus models.FollowStatus
}

type ForkRepoParams

type ForkRepoParams struct {
	LoggedInUser *oauth.User
	Knots        []string
	RepoInfo     repoinfo.RepoInfo
}

type GoodFirstIssuesParams

type GoodFirstIssuesParams struct {
	LoggedInUser *oauth.User
	Issues       []models.Issue
	RepoGroups   []*models.RepoGroup
	LabelDefs    map[string]*models.LabelDefinition
	GfiLabel     *models.LabelDefinition
	Page         pagination.Page
}

type IssueCommentBodyParams

type IssueCommentBodyParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Issue        *models.Issue
	Comment      *models.IssueComment
}

type KnotListingParams

type KnotListingParams struct {
	*models.Registration
}

type KnotParams

type KnotParams struct {
	LoggedInUser *oauth.User
	Registration *models.Registration
	Members      []string
	Repos        map[string][]models.Repo
	IsOwner      bool
}

type KnotsParams

type KnotsParams struct {
	LoggedInUser  *oauth.User
	Registrations []models.Registration
}

type LabelPanelParams

type LabelPanelParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Defs         map[string]*models.LabelDefinition
	Subject      string
	State        models.LabelState
}

type LogBlockEndParams

type LogBlockEndParams struct {
	Id        int
	StartTime time.Time
	EndTime   time.Time
}

type LogBlockParams

type LogBlockParams struct {
	Id        int
	Name      string
	Command   string
	Collapsed bool
	StartTime time.Time
}

type LogLineParams

type LogLineParams struct {
	Id      int
	Content string
}

type LoginParams

type LoginParams struct {
	ReturnUrl string
	ErrorCode string
}

type NewRepoParams

type NewRepoParams struct {
	LoggedInUser *oauth.User
	Knots        []string
}

type NotificationCountParams

type NotificationCountParams struct {
	Count int64
}

type NotificationItemParams

type NotificationItemParams struct {
	Notification *models.Notification
}

type NotificationsParams

type NotificationsParams struct {
	LoggedInUser  *oauth.User
	Notifications []*models.NotificationWithEntity
	UnreadCount   int
	Page          pagination.Page
	Total         int64
}

type Pages

type Pages struct {
	// contains filtered or unexported fields
}

func NewPages

func NewPages(config *config.Config, res *idresolver.Resolver, logger *slog.Logger) *Pages

func (*Pages) AvatarUrl

func (p *Pages) AvatarUrl(handle, size string) string

func (*Pages) Brand

func (p *Pages) Brand(w io.Writer, params BrandParams) error

func (*Pages) CompleteSignup

func (p *Pages) CompleteSignup(w io.Writer) error

func (*Pages) CssContentHash

func (p *Pages) CssContentHash() string

func (*Pages) EditBioFragment

func (p *Pages) EditBioFragment(w io.Writer, params EditBioParams) error

func (*Pages) EditIssueCommentFragment

func (p *Pages) EditIssueCommentFragment(w io.Writer, params EditIssueCommentParams) error

func (*Pages) EditIssueFragment

func (p *Pages) EditIssueFragment(w io.Writer, params EditIssueParams) error

func (*Pages) EditLabelPanel

func (p *Pages) EditLabelPanel(w io.Writer, params EditLabelPanelParams) error

func (*Pages) EditPinsFragment

func (p *Pages) EditPinsFragment(w io.Writer, params EditPinsParams) error

func (*Pages) Error404

func (p *Pages) Error404(w io.Writer) error

func (*Pages) Error500

func (p *Pages) Error500(w io.Writer) error

func (*Pages) Error503

func (p *Pages) Error503(w io.Writer) error

func (*Pages) ErrorKnot404

func (p *Pages) ErrorKnot404(w io.Writer) error

func (*Pages) Favicon

func (p *Pages) Favicon(w io.Writer) error

func (*Pages) FollowFragment

func (p *Pages) FollowFragment(w io.Writer, params FollowFragmentParams) error

func (*Pages) ForkRepo

func (p *Pages) ForkRepo(w io.Writer, params ForkRepoParams) error

func (*Pages) GoodFirstIssues

func (p *Pages) GoodFirstIssues(w io.Writer, params GoodFirstIssuesParams) error

func (*Pages) Home

func (p *Pages) Home(w io.Writer, params TimelineParams) error

func (*Pages) HxLocation

func (s *Pages) HxLocation(w http.ResponseWriter, location string)

HxLocation is an SPA-style navigation to a new location.

func (*Pages) HxRedirect

func (s *Pages) HxRedirect(w http.ResponseWriter, location string)

HxRedirect is a full page reload with a new location.

func (*Pages) HxRefresh

func (s *Pages) HxRefresh(w http.ResponseWriter)

HxRefresh is a client-side full refresh of the page.

func (*Pages) IssueCommentBodyFragment

func (p *Pages) IssueCommentBodyFragment(w io.Writer, params IssueCommentBodyParams) error

func (*Pages) Knot

func (p *Pages) Knot(w io.Writer, params KnotParams) error

func (*Pages) KnotListing

func (p *Pages) KnotListing(w io.Writer, params KnotListingParams) error

func (*Pages) Knots

func (p *Pages) Knots(w io.Writer, params KnotsParams) error

func (*Pages) LabelPanel

func (p *Pages) LabelPanel(w io.Writer, params LabelPanelParams) error

func (*Pages) LogBlock

func (p *Pages) LogBlock(w io.Writer, params LogBlockParams) error

func (*Pages) LogBlockEnd

func (p *Pages) LogBlockEnd(w io.Writer, params LogBlockEndParams) error

func (*Pages) LogLine

func (p *Pages) LogLine(w io.Writer, params LogLineParams) error

func (*Pages) Login

func (p *Pages) Login(w io.Writer, params LoginParams) error

func (*Pages) NewRepo

func (p *Pages) NewRepo(w io.Writer, params NewRepoParams) error

func (*Pages) Notice

func (s *Pages) Notice(w http.ResponseWriter, id, msg string)

Notice performs a hx-oob-swap to replace the content of an element with a message. Pass the id of the element and the message to display.

func (*Pages) NotificationCount

func (p *Pages) NotificationCount(w io.Writer, params NotificationCountParams) error

func (*Pages) NotificationItem

func (p *Pages) NotificationItem(w io.Writer, params NotificationItemParams) error

func (*Pages) Notifications

func (p *Pages) Notifications(w io.Writer, params NotificationsParams) error

func (*Pages) Pipelines

func (p *Pages) Pipelines(w io.Writer, params PipelinesParams) error

func (*Pages) PrivacyPolicy

func (p *Pages) PrivacyPolicy(w io.Writer, params PrivacyPolicyParams) error

func (*Pages) ProfileFollowers

func (p *Pages) ProfileFollowers(w io.Writer, params ProfileFollowersParams) error

func (*Pages) ProfileFollowing

func (p *Pages) ProfileFollowing(w io.Writer, params ProfileFollowingParams) error

func (*Pages) ProfileOverview

func (p *Pages) ProfileOverview(w io.Writer, params ProfileOverviewParams) error

func (*Pages) ProfileRepos

func (p *Pages) ProfileRepos(w io.Writer, params ProfileReposParams) error

func (*Pages) ProfileStarred

func (p *Pages) ProfileStarred(w io.Writer, params ProfileStarredParams) error

func (*Pages) ProfileStrings

func (p *Pages) ProfileStrings(w io.Writer, params ProfileStringsParams) error

func (*Pages) PullActionsFragment

func (p *Pages) PullActionsFragment(w io.Writer, params PullActionsParams) error

func (*Pages) PullCompareBranchesFragment

func (p *Pages) PullCompareBranchesFragment(w io.Writer, params PullCompareBranchesParams) error

func (*Pages) PullCompareForkBranchesFragment

func (p *Pages) PullCompareForkBranchesFragment(w io.Writer, params PullCompareForkBranchesParams) error

func (*Pages) PullCompareForkFragment

func (p *Pages) PullCompareForkFragment(w io.Writer, params PullCompareForkParams) error

func (*Pages) PullNewCommentFragment

func (p *Pages) PullNewCommentFragment(w io.Writer, params PullNewCommentParams) error

func (*Pages) PullPatchUploadFragment

func (p *Pages) PullPatchUploadFragment(w io.Writer, params PullPatchUploadParams) error

func (*Pages) PullResubmitFragment

func (p *Pages) PullResubmitFragment(w io.Writer, params PullResubmitParams) error

func (*Pages) PutString

func (p *Pages) PutString(w io.Writer, params PutStringParams) error

func (*Pages) ReplyIssueCommentFragment

func (p *Pages) ReplyIssueCommentFragment(w io.Writer, params ReplyIssueCommentParams) error

func (*Pages) ReplyIssueCommentPlaceholderFragment

func (p *Pages) ReplyIssueCommentPlaceholderFragment(w io.Writer, params ReplyIssueCommentPlaceholderParams) error

func (*Pages) RepoAccessSettings

func (p *Pages) RepoAccessSettings(w io.Writer, params RepoAccessSettingsParams) error

func (*Pages) RepoArtifactFragment

func (p *Pages) RepoArtifactFragment(w io.Writer, params RepoArtifactParams) error

func (*Pages) RepoBlob

func (p *Pages) RepoBlob(w io.Writer, params RepoBlobParams) error

func (*Pages) RepoBranches

func (p *Pages) RepoBranches(w io.Writer, params RepoBranchesParams) error

func (*Pages) RepoCommit

func (p *Pages) RepoCommit(w io.Writer, params RepoCommitParams) error

func (*Pages) RepoCompare

func (p *Pages) RepoCompare(w io.Writer, params RepoCompareParams) error

func (*Pages) RepoCompareAllowPullFragment

func (p *Pages) RepoCompareAllowPullFragment(w io.Writer, params RepoCompareAllowPullParams) error

func (*Pages) RepoCompareDiff

func (p *Pages) RepoCompareDiff(w io.Writer, params RepoCompareDiffParams) error

func (*Pages) RepoCompareNew

func (p *Pages) RepoCompareNew(w io.Writer, params RepoCompareNewParams) error

func (*Pages) RepoGeneralSettings

func (p *Pages) RepoGeneralSettings(w io.Writer, params RepoGeneralSettingsParams) error

func (*Pages) RepoIndexPage

func (p *Pages) RepoIndexPage(w io.Writer, params RepoIndexParams) error

func (*Pages) RepoIssues

func (p *Pages) RepoIssues(w io.Writer, params RepoIssuesParams) error

func (*Pages) RepoLog

func (p *Pages) RepoLog(w io.Writer, params RepoLogParams) error

func (*Pages) RepoNewIssue

func (p *Pages) RepoNewIssue(w io.Writer, params RepoNewIssueParams) error

func (*Pages) RepoNewPull

func (p *Pages) RepoNewPull(w io.Writer, params RepoNewPullParams) error

func (*Pages) RepoPipelineSettings

func (p *Pages) RepoPipelineSettings(w io.Writer, params RepoPipelineSettingsParams) error

func (*Pages) RepoPullInterdiffPage

func (p *Pages) RepoPullInterdiffPage(w io.Writer, params RepoPullInterdiffParams) error

this name is a mouthful

func (*Pages) RepoPullPatchPage

func (p *Pages) RepoPullPatchPage(w io.Writer, params RepoPullPatchParams) error

this name is a mouthful

func (*Pages) RepoPulls

func (p *Pages) RepoPulls(w io.Writer, params RepoPullsParams) error

func (*Pages) RepoSettings

func (p *Pages) RepoSettings(w io.Writer, params RepoSettingsParams) error

func (*Pages) RepoSingleIssue

func (p *Pages) RepoSingleIssue(w io.Writer, params RepoSingleIssueParams) error

func (*Pages) RepoSinglePull

func (p *Pages) RepoSinglePull(w io.Writer, params RepoSinglePullParams) error

func (*Pages) RepoStarFragment

func (p *Pages) RepoStarFragment(w io.Writer, params RepoStarFragmentParams) error

func (*Pages) RepoTags

func (p *Pages) RepoTags(w io.Writer, params RepoTagsParams) error

func (*Pages) RepoTree

func (p *Pages) RepoTree(w io.Writer, params RepoTreeParams) error

func (*Pages) Signup

func (p *Pages) Signup(w io.Writer, params SignupParams) error

func (*Pages) SingleString

func (p *Pages) SingleString(w io.Writer, params SingleStringParams) error

func (*Pages) SpindleDashboard

func (p *Pages) SpindleDashboard(w io.Writer, params SpindleDashboardParams) error

func (*Pages) SpindleListing

func (p *Pages) SpindleListing(w io.Writer, params SpindleListingParams) error

func (*Pages) Spindles

func (p *Pages) Spindles(w io.Writer, params SpindlesParams) error

func (*Pages) Static

func (p *Pages) Static() http.Handler

func (*Pages) StringsDashboard

func (p *Pages) StringsDashboard(w io.Writer, params StringsDashboardParams) error

func (*Pages) StringsTimeline

func (p *Pages) StringsTimeline(w io.Writer, params StringTimelineParams) error

func (*Pages) TermsOfService

func (p *Pages) TermsOfService(w io.Writer, params TermsOfServiceParams) error

func (*Pages) ThreadReactionFragment

func (p *Pages) ThreadReactionFragment(w io.Writer, params ThreadReactionFragmentParams) error

func (*Pages) Timeline

func (p *Pages) Timeline(w io.Writer, params TimelineParams) error

func (*Pages) UpgradeBanner

func (p *Pages) UpgradeBanner(w io.Writer, params UpgradeBannerParams) error

func (*Pages) UserEmailsSettings

func (p *Pages) UserEmailsSettings(w io.Writer, params UserEmailsSettingsParams) error

func (*Pages) UserKeysSettings

func (p *Pages) UserKeysSettings(w io.Writer, params UserKeysSettingsParams) error

func (*Pages) UserNotificationSettings

func (p *Pages) UserNotificationSettings(w io.Writer, params UserNotificationSettingsParams) error

func (*Pages) UserProfileSettings

func (p *Pages) UserProfileSettings(w io.Writer, params UserProfileSettingsParams) error

func (*Pages) Workflow

func (p *Pages) Workflow(w io.Writer, params WorkflowParams) error

type PinnedRepo

type PinnedRepo struct {
	IsPinned bool
	models.Repo
}

type PipelinesParams

type PipelinesParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Pipelines    []models.Pipeline
	Active       string
}

type PrivacyPolicyParams

type PrivacyPolicyParams struct {
	LoggedInUser *oauth.User
	Content      template.HTML
}

type ProfileCard

type ProfileCard struct {
	UserDid      string
	UserHandle   string
	FollowStatus models.FollowStatus
	Punchcard    *models.Punchcard
	Profile      *models.Profile
	Stats        ProfileStats
	Active       string
}

func (*ProfileCard) GetTabs

func (p *ProfileCard) GetTabs() [][]any

type ProfileFollowersParams

type ProfileFollowersParams struct {
	LoggedInUser *oauth.User
	Followers    []FollowCard
	Card         *ProfileCard
	Active       string
}

type ProfileFollowingParams

type ProfileFollowingParams struct {
	LoggedInUser *oauth.User
	Following    []FollowCard
	Card         *ProfileCard
	Active       string
}

type ProfileOverviewParams

type ProfileOverviewParams struct {
	LoggedInUser       *oauth.User
	Repos              []models.Repo
	CollaboratingRepos []models.Repo
	ProfileTimeline    *models.ProfileTimeline
	Card               *ProfileCard
	Active             string
}

type ProfileReposParams

type ProfileReposParams struct {
	LoggedInUser *oauth.User
	Repos        []models.Repo
	Card         *ProfileCard
	Active       string
}

type ProfileStarredParams

type ProfileStarredParams struct {
	LoggedInUser *oauth.User
	Repos        []models.Repo
	Card         *ProfileCard
	Active       string
}

type ProfileStats

type ProfileStats struct {
	RepoCount      int64
	StarredCount   int64
	StringCount    int64
	FollowersCount int64
	FollowingCount int64
}

type ProfileStringsParams

type ProfileStringsParams struct {
	LoggedInUser *oauth.User
	Strings      []models.String
	Card         *ProfileCard
	Active       string
}

type PullActionsParams

type PullActionsParams struct {
	LoggedInUser       *oauth.User
	RepoInfo           repoinfo.RepoInfo
	Pull               *models.Pull
	RoundNumber        int
	MergeCheck         types.MergeCheckResponse
	ResubmitCheck      ResubmitResult
	BranchDeleteStatus *models.BranchDeleteStatus
	Stack              models.Stack
}

type PullCompareBranchesParams

type PullCompareBranchesParams struct {
	RepoInfo     repoinfo.RepoInfo
	Branches     []types.Branch
	SourceBranch string
}

type PullCompareForkBranchesParams

type PullCompareForkBranchesParams struct {
	RepoInfo       repoinfo.RepoInfo
	SourceBranches []types.Branch
	TargetBranches []types.Branch
}

type PullCompareForkParams

type PullCompareForkParams struct {
	RepoInfo repoinfo.RepoInfo
	Forks    []models.Repo
	Selected string
}

type PullNewCommentParams

type PullNewCommentParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Pull         *models.Pull
	RoundNumber  int
}

type PullPatchUploadParams

type PullPatchUploadParams struct {
	RepoInfo repoinfo.RepoInfo
}

type PullResubmitParams

type PullResubmitParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Pull         *models.Pull
	SubmissionId int
}

type PutStringParams

type PutStringParams struct {
	LoggedInUser *oauth.User
	Action       string

	// this is supplied in the case of editing an existing string
	String models.String
}

type ReplyIssueCommentParams

type ReplyIssueCommentParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Issue        *models.Issue
	Comment      *models.IssueComment
}

type ReplyIssueCommentPlaceholderParams

type ReplyIssueCommentPlaceholderParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Issue        *models.Issue
	Comment      *models.IssueComment
}

type RepoAccessSettingsParams

type RepoAccessSettingsParams struct {
	LoggedInUser  *oauth.User
	RepoInfo      repoinfo.RepoInfo
	Active        string
	Tabs          []map[string]any
	Tab           string
	Collaborators []Collaborator
}

type RepoArtifactParams

type RepoArtifactParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Artifact     models.Artifact
}

type RepoBlobParams

type RepoBlobParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Active       string
	BreadCrumbs  [][]string
	BlobView     models.BlobView
	*tangled.RepoBlob_Output
}

type RepoBranchesParams

type RepoBranchesParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Active       string
	types.RepoBranchesResponse
}

type RepoCommitParams

type RepoCommitParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Active       string
	EmailToDid   map[string]string
	Pipeline     *models.Pipeline
	DiffOpts     types.DiffOpts

	// singular because it's always going to be just one
	VerifiedCommit commitverify.VerifiedCommits

	types.RepoCommitResponse
}

type RepoCompareAllowPullParams

type RepoCompareAllowPullParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Base         string
	Head         string
}

type RepoCompareDiffParams

type RepoCompareDiffParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Diff         types.NiceDiff
}

type RepoCompareNewParams

type RepoCompareNewParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Forks        []models.Repo
	Branches     []types.Branch
	Tags         []*types.TagReference
	Base         string
	Head         string

	Active string
}

type RepoCompareParams

type RepoCompareParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Forks        []models.Repo
	Branches     []types.Branch
	Tags         []*types.TagReference
	Base         string
	Head         string
	Diff         *types.NiceDiff
	DiffOpts     types.DiffOpts

	Active string
}

type RepoGeneralSettingsParams

type RepoGeneralSettingsParams struct {
	LoggedInUser       *oauth.User
	RepoInfo           repoinfo.RepoInfo
	Labels             []models.LabelDefinition
	DefaultLabels      []models.LabelDefinition
	SubscribedLabels   map[string]struct{}
	ShouldSubscribeAll bool
	Active             string
	Tabs               []map[string]any
	Tab                string
	Branches           []types.Branch
}

type RepoIndexParams

type RepoIndexParams struct {
	LoggedInUser  *oauth.User
	RepoInfo      repoinfo.RepoInfo
	Active        string
	TagMap        map[string][]string
	CommitsTrunc  []*object.Commit
	TagsTrunc     []*types.TagReference
	BranchesTrunc []types.Branch
	// ForkInfo           *types.ForkInfo
	HTMLReadme       template.HTML
	Raw              bool
	EmailToDid       map[string]string
	VerifiedCommits  commitverify.VerifiedCommits
	Languages        []types.RepoLanguageDetails
	Pipelines        map[string]models.Pipeline
	NeedsKnotUpgrade bool
	types.RepoIndexResponse
}

type RepoIssuesParams

type RepoIssuesParams struct {
	LoggedInUser    *oauth.User
	RepoInfo        repoinfo.RepoInfo
	Active          string
	Issues          []models.Issue
	LabelDefs       map[string]*models.LabelDefinition
	Page            pagination.Page
	FilteringByOpen bool
	FilterQuery     string
}

type RepoLogParams

type RepoLogParams struct {
	LoggedInUser    *oauth.User
	RepoInfo        repoinfo.RepoInfo
	TagMap          map[string][]string
	Active          string
	EmailToDid      map[string]string
	VerifiedCommits commitverify.VerifiedCommits
	Pipelines       map[string]models.Pipeline

	types.RepoLogResponse
}

type RepoNewIssueParams

type RepoNewIssueParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Issue        *models.Issue // existing issue if any -- passed when editing
	Active       string
	Action       string
}

type RepoNewPullParams

type RepoNewPullParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Branches     []types.Branch
	Strategy     string
	SourceBranch string
	TargetBranch string
	Title        string
	Body         string
	Active       string
}

type RepoPipelineSettingsParams

type RepoPipelineSettingsParams struct {
	LoggedInUser   *oauth.User
	RepoInfo       repoinfo.RepoInfo
	Active         string
	Tabs           []map[string]any
	Tab            string
	Spindles       []string
	CurrentSpindle string
	Secrets        []map[string]any
}

type RepoPullInterdiffParams

type RepoPullInterdiffParams struct {
	LoggedInUser         *oauth.User
	RepoInfo             repoinfo.RepoInfo
	Pull                 *models.Pull
	Round                int
	Interdiff            *patchutil.InterdiffResult
	OrderedReactionKinds []models.ReactionKind
	DiffOpts             types.DiffOpts
}

type RepoPullPatchParams

type RepoPullPatchParams struct {
	LoggedInUser         *oauth.User
	RepoInfo             repoinfo.RepoInfo
	Pull                 *models.Pull
	Stack                models.Stack
	Diff                 *types.NiceDiff
	Round                int
	Submission           *models.PullSubmission
	OrderedReactionKinds []models.ReactionKind
	DiffOpts             types.DiffOpts
}

type RepoPullsParams

type RepoPullsParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Pulls        []*models.Pull
	Active       string
	FilteringBy  models.PullState
	FilterQuery  string
	Stacks       map[string]models.Stack
	Pipelines    map[string]models.Pipeline
	LabelDefs    map[string]*models.LabelDefinition
}

type RepoSettingsParams

type RepoSettingsParams struct {
	LoggedInUser   *oauth.User
	RepoInfo       repoinfo.RepoInfo
	Collaborators  []Collaborator
	Active         string
	Branches       []types.Branch
	Spindles       []string
	CurrentSpindle string
	Secrets        []*tangled.RepoListSecrets_Secret

	// TODO: use repoinfo.roles
	IsCollaboratorInviteAllowed bool
}

type RepoSingleIssueParams

type RepoSingleIssueParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Active       string
	Issue        *models.Issue
	CommentList  []models.CommentListItem
	LabelDefs    map[string]*models.LabelDefinition

	OrderedReactionKinds []models.ReactionKind
	Reactions            map[models.ReactionKind]models.ReactionDisplayData
	UserReacted          map[models.ReactionKind]bool
}

type RepoSinglePullParams

type RepoSinglePullParams struct {
	LoggedInUser       *oauth.User
	RepoInfo           repoinfo.RepoInfo
	Active             string
	Pull               *models.Pull
	Stack              models.Stack
	AbandonedPulls     []*models.Pull
	BranchDeleteStatus *models.BranchDeleteStatus
	MergeCheck         types.MergeCheckResponse
	ResubmitCheck      ResubmitResult
	Pipelines          map[string]models.Pipeline

	OrderedReactionKinds []models.ReactionKind
	Reactions            map[models.ReactionKind]models.ReactionDisplayData
	UserReacted          map[models.ReactionKind]bool

	LabelDefs map[string]*models.LabelDefinition
}

type RepoStarFragmentParams

type RepoStarFragmentParams struct {
	IsStarred bool
	RepoAt    syntax.ATURI
	Stats     models.RepoStats
}

type RepoTagsParams

type RepoTagsParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Active       string
	types.RepoTagsResponse
	ArtifactMap       map[plumbing.Hash][]models.Artifact
	DanglingArtifacts []models.Artifact
}

type RepoTreeParams

type RepoTreeParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Active       string
	BreadCrumbs  [][]string
	TreePath     string
	Raw          bool
	HTMLReadme   template.HTML
	types.RepoTreeResponse
}

func (RepoTreeParams) TreeStats

func (r RepoTreeParams) TreeStats() RepoTreeStats

type RepoTreeStats

type RepoTreeStats struct {
	NumFolders uint64
	NumFiles   uint64
}

type ResubmitResult

type ResubmitResult uint64
const (
	ShouldResubmit ResubmitResult = iota
	ShouldNotResubmit
	Unknown
)

func (ResubmitResult) No

func (r ResubmitResult) No() bool

func (ResubmitResult) Unknown

func (r ResubmitResult) Unknown() bool

func (ResubmitResult) Yes

func (r ResubmitResult) Yes() bool

type SignupParams

type SignupParams struct {
	CloudflareSiteKey string
}

type SingleStringParams

type SingleStringParams struct {
	LoggedInUser     *oauth.User
	ShowRendered     bool
	RenderToggle     bool
	RenderedContents template.HTML
	String           models.String
	Stats            models.StringStats
	Owner            identity.Identity
}

type SpindleDashboardParams

type SpindleDashboardParams struct {
	LoggedInUser *oauth.User
	Spindle      models.Spindle
	Members      []string
	Repos        map[string][]models.Repo
}

type SpindleListingParams

type SpindleListingParams struct {
	models.Spindle
}

type SpindlesParams

type SpindlesParams struct {
	LoggedInUser *oauth.User
	Spindles     []models.Spindle
}

type StringTimelineParams

type StringTimelineParams struct {
	LoggedInUser *oauth.User
	Strings      []models.String
}

type StringsDashboardParams

type StringsDashboardParams struct {
	LoggedInUser *oauth.User
	Card         ProfileCard
	Strings      []models.String
}

type TermsOfServiceParams

type TermsOfServiceParams struct {
	LoggedInUser *oauth.User
	Content      template.HTML
}

type ThreadReactionFragmentParams

type ThreadReactionFragmentParams struct {
	ThreadAt  syntax.ATURI
	Kind      models.ReactionKind
	Count     int
	Users     []string
	IsReacted bool
}

type TimelineParams

type TimelineParams struct {
	LoggedInUser *oauth.User
	Timeline     []models.TimelineEvent
	Repos        []models.Repo
	GfiLabel     *models.LabelDefinition
}

type TmplCache

type TmplCache[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewTmplCache

func NewTmplCache[K comparable, V any]() *TmplCache[K, V]

func (*TmplCache[K, V]) Get

func (c *TmplCache[K, V]) Get(key K) (V, bool)

func (*TmplCache[K, V]) Set

func (c *TmplCache[K, V]) Set(key K, value V)

func (*TmplCache[K, V]) Size

func (c *TmplCache[K, V]) Size() int

type UpgradeBannerParams

type UpgradeBannerParams struct {
	Registrations []models.Registration
	Spindles      []models.Spindle
}

type UserEmailsSettingsParams

type UserEmailsSettingsParams struct {
	LoggedInUser *oauth.User
	Emails       []models.Email
	Tabs         []map[string]any
	Tab          string
}

type UserKeysSettingsParams

type UserKeysSettingsParams struct {
	LoggedInUser *oauth.User
	PubKeys      []models.PublicKey
	Tabs         []map[string]any
	Tab          string
}

type UserNotificationSettingsParams

type UserNotificationSettingsParams struct {
	LoggedInUser *oauth.User
	Preferences  *models.NotificationPreferences
	Tabs         []map[string]any
	Tab          string
}

type UserProfileSettingsParams

type UserProfileSettingsParams struct {
	LoggedInUser *oauth.User
	Tabs         []map[string]any
	Tab          string
}

type WorkflowParams

type WorkflowParams struct {
	LoggedInUser *oauth.User
	RepoInfo     repoinfo.RepoInfo
	Pipeline     models.Pipeline
	Workflow     string
	LogUrl       string
	Active       string
}

Source Files

  • cache.go
  • funcmap.go
  • htmx.go
  • pages.go

Directories

Path Synopsis
Package markup is an umbrella package for all markups and their renderers.
Package markup is an umbrella package for all markups and their renderers.

Jump to

Keyboard shortcuts

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