internal/

directory
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2025 License: MIT

README

Internal Directory

Purpose

The internal directory contains private application code that is specific to INIQ and not intended for use by external applications. Go enforces this by preventing imports of code from this directory by packages outside the parent module.

Structure

  • config/: Configuration handling and environment variables

    • Manages loading and parsing of configuration files
    • Handles environment variable integration
    • Provides configuration validation
  • features/: Core feature implementations

    • Contains the implementation of all INIQ features
    • Each feature is implemented as a separate package
    • Features follow a common interface defined in features/feature.go
  • logger/: Logging functionality

    • Provides structured logging with different levels
    • Supports different output formats (text, JSON)
    • Handles log rotation and filtering
  • utils/: Utility functions for internal use

    • Common helper functions used across the application
    • Not intended for external use

Usage

Code in this directory should:

  1. Implement the core functionality of INIQ
  2. Be organized into logical packages based on functionality
  3. Follow the interfaces defined in the feature package
  4. Be well-tested with unit tests

Development Guidelines

  • Keep packages focused on a single responsibility
  • Use interfaces to define clear boundaries between components
  • Write comprehensive unit tests for all functionality
  • Do not expose implementation details unnecessarily
  • Document all exported functions, types, and constants

Important Note

Code in the internal directory cannot be imported by external projects. This is enforced by the Go compiler. If you need to create reusable components that can be used by other projects, place them in the pkg directory instead.

Directories

Path Synopsis
Package features defines the core feature interface and common functionality
Package features defines the core feature interface and common functionality
security
Package security implements the SSH security configuration feature
Package security implements the SSH security configuration feature
ssh
Package ssh implements the SSH key management feature
Package ssh implements the SSH key management feature
sudo
Package sudo implements the sudo configuration feature
Package sudo implements the sudo configuration feature
user
Package user implements the user management feature
Package user implements the user management feature
Package logger provides logging functionality for the application
Package logger provides logging functionality for the application
Package utils provides utility functions for INIQ
Package utils provides utility functions for INIQ
Package version provides version information for the INIQ application
Package version provides version information for the INIQ application

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL