summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-01-15 12:13:32 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-01-15 12:27:55 +0100
commit7f17e3abfb0028127027db2d9424257a90d97384 (patch)
treec023e66a8b9447984b3c14750874bea6537215a1
parentMake project into pdk module. (diff)
downloadcgit-7f17e3abfb0028127027db2d9424257a90d97384.tar.gz
cgit-7f17e3abfb0028127027db2d9424257a90d97384.tar.xz
Document classes.
-rw-r--r--manifests/filter.pp11
-rw-r--r--manifests/filter_setup.pp4
-rw-r--r--manifests/init.pp52
-rw-r--r--manifests/nginx.pp2
4 files changed, 69 insertions, 0 deletions
diff --git a/manifests/filter.pp b/manifests/filter.pp
index bcba582..1c092f1 100644
--- a/manifests/filter.pp
+++ b/manifests/filter.pp
@@ -1,3 +1,14 @@
+# @summary Manages a single cgit filter.
+# @param filtername
+# Target filter.
+# @param source
+# Soruce file of filter, mutually exclusive with content.
+# @param content
+# Contents of filter, mutually exclusive with source.
+# @param file_props
+# Passed along to the file resource. Useful for checksums.
+# @param type
+# If it's a lua or exec filter. Inferred from source filename.
define cgit::filter (
Cgit::Filter_types $filtername = $name,
Optional[Variant[String, Array[String]]] $source = undef,
diff --git a/manifests/filter_setup.pp b/manifests/filter_setup.pp
index 8f42537..e79f70b 100644
--- a/manifests/filter_setup.pp
+++ b/manifests/filter_setup.pp
@@ -1,3 +1,7 @@
+# @summary Basework for filters on system
+# @param filterpath
+# Where in the filesystem filters should be kept.
+# @api private
class cgit::filter_setup (
String $filterpath = $::cgit::filterpath,
) {
diff --git a/manifests/init.pp b/manifests/init.pp
index 5856cf9..6599301 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,3 +1,55 @@
+# @summary Manages a cgit server
+#
+# Many of these options maps directly to cgit's options (replace
+# underscore with dash).
+#
+# Also see cgitrc(5).
+#
+# @param root_title
+# Top title of webpage
+# @param root_desc
+# Description under title on web page
+# @param scan_path
+# Directory to scan for git repos
+# @param clone_url
+# List of
+# @param root
+# Webroot, media files and similar will be placed here
+# @param filterpath
+# Where filter files shouldbe placed
+# @param root_readme_source
+# Source attribute passed along to puppet's file for the global
+# summary page. Mutually exclusive with root_readme_content.
+# @param root_readme_content
+# Content attribute passed along to puppet's file for the global
+# summary page. Mutually exclusive with root_readme_source.
+# @param root_readme_sha256
+# SHA256 sum of root_readme_{source,content}
+# @param root_readme_extension
+# Optional extension of file. Useful if ones "about" filter checks
+# filename to determine rendering.
+# @param enable_http_clone
+# Enable cgit's built in dump HTTP clone entdpoint.
+# @param public_repos
+# A list of repos under scan_path which should be public. Used if
+# manage_server is set to nginx, and is also dumped to the file
+# /usr/local/var/public-repos, for use by custom filters.
+# @param users
+# Used for basic auth by nginx, if manage_server is true.
+# @param manage_server
+# Should a webserver be managed by us. Currently only nginx is
+# supported.
+# @param server_name
+# Passed to nginx::resource::server's server_name.
+# @param certname
+# Target TLS certificate used by nginx.
+# @param htpasswd
+# Path to htpasswd file used by nginx's basic auth.
+# @param cgitrc
+# Path to system cgitrc file.
+# @param filters
+# CGIT filters to be managed.
+# @see cgit::filter
class cgit (
String $root_title,
String $root_desc,
diff --git a/manifests/nginx.pp b/manifests/nginx.pp
index 7146e05..23e6874 100644
--- a/manifests/nginx.pp
+++ b/manifests/nginx.pp
@@ -1,3 +1,5 @@
+# @summary Manages nginx resources for cgit
+# @api private
class cgit::nginx {
if ($cgit::certname == undef) {