Add package docs and project vision/goals (#5169)

* Add goals/design vision to contributing doc
* Add barebones package documentation
This commit is contained in:
WithoutPants
2024-08-28 09:01:39 +10:00
committed by GitHub
parent 10341fba58
commit b7799df2a6
40 changed files with 96 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
// Package file provides functionality for managing, scanning and cleaning files and folders.
package file
import (

View File

@@ -1,3 +1,4 @@
// Package fsutil provides filesystem utility functions for the application.
package fsutil
import (

View File

@@ -1,3 +1,5 @@
// Package gallery provides application logic for managing galleries.
// This functionality is exposed via the [Service] type.
package gallery
import (

2
pkg/group/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package group provides the application logic for groups.
package group

View File

@@ -1,3 +1,5 @@
// Package image provides the application logic for images.
// The functionality is exposed via the [Service] type.
package image
import (

View File

@@ -1,8 +1,8 @@
// Package javascript provides the javascript runtime for the application.
package javascript
import (
"fmt"
"net/http"
"os"
"reflect"
@@ -10,12 +10,9 @@ import (
"github.com/stashapp/stash/pkg/logger"
)
// VM is a wrapper around goja.Runtime.
type VM struct {
*goja.Runtime
Progress chan float64
SessionCookie *http.Cookie
GQLHandler http.Handler
}
// optionalFieldNameMapper wraps a goja.FieldNameMapper and returns the field name if the wrapped mapper returns an empty string.

View File

@@ -1,3 +1,4 @@
// Package job provides the job execution and management functionality for the application.
package job
import (

View File

@@ -1,3 +1,4 @@
// Package match provides functions for matching paths to models.
package match
import (

2
pkg/models/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package models provides application models that are used throughout the application.
package models

View File

@@ -1,3 +1,4 @@
// Package json provides generic JSON types.
package json
import (

View File

@@ -0,0 +1,2 @@
// Package jsonschema provides the JSON schema models used for importing and exporting data.
package jsonschema

View File

@@ -1,3 +1,4 @@
// Package mocks provides mocks for various interfaces in [models].
package mocks
import (

View File

@@ -1,3 +1,4 @@
// Package paths provides functions to return paths to various resources.
package paths
import (

2
pkg/performer/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package performer provides the application logic for performer functionality.
package performer

View File

@@ -1,3 +1,4 @@
// Package pkg provides interfaces to interact with the package system used for plugins and scrapers.
package pkg
import (

View File

@@ -1,3 +1,4 @@
// Package python provides utilities for working with the python executable.
package python
import (

View File

@@ -1,3 +1,4 @@
// Package generate provides functions to generate media assets from scenes.
package generate
import (

View File

@@ -1,3 +1,5 @@
// Package scene provides the application logic for scene functionality.
// Most functionality is provided by [Service].
package scene
import (

View File

@@ -1,3 +1,5 @@
// Package scraper provides interfaces to interact with the scraper subsystem.
// The [Cache] type is the main entry point to the scraper subsystem.
package scraper
import (

View File

@@ -1,3 +1,4 @@
// Package stashbox provides a client interface to a stash-box server instance.
package stashbox
import (

View File

@@ -1,3 +1,4 @@
// Package session provides session authentication and management for the application.
package session
import (

View File

@@ -1,3 +1,4 @@
// Package sliceutil provides utilities for working with slices.
package sliceutil
// Index returns the first index of the provided value in the provided

2
pkg/sqlite/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package sqlite provides interfaces to interact with the sqlite database.
package sqlite

2
pkg/studio/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package studio provides the application logic for studio functionality.
package studio

2
pkg/tag/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package tag provides application logic for tag objects.
package tag

View File

@@ -1,3 +1,4 @@
// Package txn provides functions for running transactions.
package txn
import (

2
pkg/utils/doc.go Normal file
View File

@@ -0,0 +1,2 @@
// Package utils provides various utility functions for the application.
package utils