<commit_before>package common

import (
	"time"
)

type AccessType int

const (
	DB_BOTH AccessType = iota
	DB_PRIVATE
	DB_PUBLIC
)

type ForkType int

const (
	SPACE ForkType = iota
	ROOT
	STEM
	BRANCH
	END
)

type LicenseType int

const (
	// From http://opendefinition.org/licenses/
	CC0 LicenseType = iota
	PDDL
	CCBY
	ODCBY
	CCBYSA
	ODbL
	CCA
	CCSA
	DLDEBY
	DLDE0
	DSL
	FAL
	GNUFDL
	MIROSL
	OGLC
	OGLUK
	NONE
	OTHER
)

type ValType int

const (
	Binary ValType = iota
	Image
	Null
	Text
	Integer
	Float
)

// Stored cached data in memcache for 1 full day (as a first guess, which will probably need training)
const CacheTime = 86400

// Number of rows to display by default on the database page
const DefaultNumDisplayRows = 25

// Number of connections to PostgreSQL to use
const PGConnections = 5

// ************************
// Configuration file types

// Configuration file
type TomlConfig struct {
	Admin AdminInfo
	Auth0 Auth0Info
	Cache CacheInfo
	DB4S  DB4SInfo
	Minio MinioInfo
	Pg    PGInfo
	Sign  SigningInfo
	Web   WebInfo
}

// Config info for the admin server
type AdminInfo struct {
	Certificate    string
	CertificateKey string `toml:"certificate_key"`<commit_msg>Store data in memcache for 30 days by default<commit_after>package common

import (
	"time"
)

type AccessType int

const (
	DB_BOTH AccessType = iota
	DB_PRIVATE
	DB_PUBLIC
)

type ForkType int

const (
	SPACE ForkType = iota
	ROOT
	STEM
	BRANCH
	END
)

type LicenseType int

const (
	// From http://opendefinition.org/licenses/
	CC0 LicenseType = iota
	PDDL
	CCBY
	ODCBY
	CCBYSA
	ODbL
	CCA
	CCSA
	DLDEBY
	DLDE0
	DSL
	FAL
	GNUFDL
	MIROSL
	OGLC
	OGLUK
	NONE
	OTHER
)

type ValType int

const (
	Binary ValType = iota
	Image
	Null
	Text
	Integer
	Float
)

// Store cached data in memcache for 30 days days (as a first guess, which will probably need tuning)
const CacheTime = 2592000

// Number of rows to display by default on the database page
const DefaultNumDisplayRows = 25

// Number of connections to PostgreSQL to use
const PGConnections = 5

// ************************
// Configuration file types

// Configuration file
type TomlConfig struct {
	Admin AdminInfo
	Auth0 Auth0Info
	Cache CacheInfo
	DB4S  DB4SInfo
	Minio MinioInfo
	Pg    PGInfo
	Sign  SigningInfo
	Web   WebInfo
}

// Config info for the admin server
type AdminInfo struct {
	Certificate    string
	CertificateKey string `toml:"certificate_key"`
{'fraction_non_alphanumeric': 0.0656964656964657, 'fraction_numerical': 0.014553014553014554, 'mean_word_length': 3.497196261682243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2796523', 'n_tokens_mistral': 891, 'n_tokens_neox': 860, 'n_words': 297}