Documentation
¶
Index ¶
- Constants
- func AddOwnerRepoGitLFSRoutes(m *web.Router, middlewares ...any)
- func FetchRedirectDelegate(resp http.ResponseWriter, req *http.Request)
- func InitDBEngine(ctx context.Context) (err error)
- func ParseAPIDeadlineToEndOfDay(t *time.Time) (timeutil.TimeStamp, error)
- func ParseDeadlineDateToEndOfDay(date string) (timeutil.TimeStamp, error)
- func PrepareCodeSearch(ctx *context.Context) (ret struct{ ... })
- func ProtocolMiddlewares() (handlers []any)
- func RenderMarkup(ctx *context.Base, ctxRepo *context.Repository, ...)
- func RenderPanicErrorPage(w http.ResponseWriter, req *http.Request, err any)
- func ServeBlob(ctx *context.Base, filePath string, blob *git.Blob, lastModified *time.Time) error
- func ServeContentByReadSeeker(ctx *context.Base, filePath string, modTime *time.Time, reader io.ReadSeeker)
- func ServeContentByReader(ctx *context.Base, filePath string, size int64, reader io.Reader)
- func Sessioner() func(next http.Handler) http.Handler
- type AuthResult
- type CompareInfo
- type VerifyOptions
Constants ¶
View Source
const RouterMockPointCommonLFS = "common-lfs"
Variables ¶
This section is empty.
Functions ¶
func AddOwnerRepoGitLFSRoutes ¶ added in v1.23.0
func FetchRedirectDelegate ¶ added in v1.21.0
func FetchRedirectDelegate(resp http.ResponseWriter, req *http.Request)
FetchRedirectDelegate helps the "fetch" requests to redirect to the correct location
func InitDBEngine ¶
InitDBEngine In case of problems connecting to DB, retry connection. Eg, PGSQL in Docker Container on Synology
func ParseAPIDeadlineToEndOfDay ¶ added in v1.23.0
func ParseDeadlineDateToEndOfDay ¶ added in v1.23.0
func PrepareCodeSearch ¶ added in v1.23.0
func ProtocolMiddlewares ¶ added in v1.20.0
func ProtocolMiddlewares() (handlers []any)
ProtocolMiddlewares returns HTTP protocol related middlewares, and it provides a global panic recovery
func RenderMarkup ¶ added in v1.20.0
func RenderMarkup(ctx *context.Base, ctxRepo *context.Repository, mode, text, urlPathContext, filePath string)
RenderMarkup renders markup text for the /markup and /markdown endpoints
func RenderPanicErrorPage ¶ added in v1.20.0
func RenderPanicErrorPage(w http.ResponseWriter, req *http.Request, err any)
RenderPanicErrorPage renders a 500 page, and it never panics
func ServeContentByReadSeeker ¶ added in v1.20.0
func ServeContentByReader ¶ added in v1.20.0
Types ¶
type AuthResult ¶ added in v1.21.0
type AuthResult struct { Doer *user_model.User IsBasicAuth bool }
func AuthShared ¶ added in v1.21.0
func AuthShared(ctx *context.Base, sessionStore auth_service.SessionStore, authMethod auth_service.Method) (ar AuthResult, err error)
type CompareInfo ¶ added in v1.22.0
type CompareInfo struct { HeadUser *user_model.User HeadRepo *repo_model.Repository HeadGitRepo *git.Repository CompareInfo *git.CompareInfo BaseBranch string HeadBranch string DirectComparison bool }
CompareInfo represents the collected results from ParseCompareInfo
Click to show internal directories.
Click to hide internal directories.