Lightweight and easily self-hostable Git forge. git.poy.ooo
git-forge selfhosting homebrew
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445package lib
import ( "encoding/base64" "regexp")
const SessionDurationDays = 7 // 1 week
const DatabaseCleanupMinutes = 10 // ten minutes
const GitReposDir = "data/repos/"const GitBranchMaxLen = 100const GitBranchMinLen = 2const GitDefaultBranch = "master"const GitHashLength = 8
var GitNameRegex = regexp.MustCompile("^[a-zA-Z0-9](?:[a-zA-Z0-9]|[-_][a-zA-Z0-9])*$")var GitBranchRegex = regexp.MustCompile(`^([a-z0-9A-Z._-]+\/)*[a-z0-9A-Z._-]+$`)
const MaxBlobPreviewBytes = 5 << 20 // 5 MiB - blobs larger than this are not loaded for preview.const MaxFileRawBytes = 256 << 20 // 256 MiB per file.const MaxRepoRawBytes = 1 << 30 // 1 GiB per repo.
const SSHPort = 6969const SSHHostKeyPath = "data/host_key"
const IssueTitleMaxLen = 100 // charactersconst IssueDescriptionMaxLen = 2000 // charactersconst IssueCommentMaxLen = 3000 // characters
const GistTitleMaxLen = 100 // charactersconst GistContentMaxLen = 30000 // characters
const OAuthStateDurationMins = 10
var Base64Encoder = base64.URLEncodingvar ValidationErrorKey = "ValidationErr-"
const MessageKey = "msg"const ErrorKey = "err"const SessionKey = "session"const LoggedInKey = "loggedIn"const UserKey = "user"