Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppEntry ¶
type AppEntry struct {
// Class specifies what class this binding is bound to.
Class string `json:"class"`
// Path specifies the file path where the binding is defined.
Path string `json:"path"`
// Line indicates the line number in the file where the app entry is declared.
Line int `json:"line"`
}
AppEntry represents an entry for an application binding in laravel. It holds static information about where a binding is defined in the application
type AppRepository ¶
type AppRepository = Repository[AppEntry]
AppRepository is a type alias for Repository specialized for AppEntry.
type ConfigEntry ¶
type ConfigEntry struct {
// Value holds the actual value.
Value any `json:"value"`
// File specifies the file path where the configuration entry is defined.
File string `json:"file"`
// Line indicates the line number in the file where the configuration entry is defined.
Line int `json:"line"`
}
ConfigEntry holds information for an entry for a single configuration key,value pair in a laravel application.
type ConfigRepository ¶
type ConfigRepository = Repository[ConfigEntry]
ConfigRepository is a type alias for Repository specialized for ConfigEntry.
type Repository ¶
Repository is a generic type that maps string keys to values of any type. It essentially acts as a collection for storing and retrieving data by key.
func (*Repository[T]) Clear ¶
func (r *Repository[T]) Clear()
Clear removes all entries from the repository, resetting it to an empty state.
func (Repository[T]) Exists ¶
func (r Repository[T]) Exists(key string) bool
Exists checks if a specific key exists within the repository.
Parameters:
- key: The key to check for existence.
Returns:
- A boolean indicating whether the key exists.
func (Repository[T]) Find ¶
func (r Repository[T]) Find(input string) map[string]T
Find searches for entries in the repository whose keys start with the provided prefix. It returns a new map containing only the matching entries.
Parameters:
- input: The prefix string to match keys against.
Returns:
- A map of keys and their corresponding values that match the prefix.
func (Repository[T]) Get ¶
func (r Repository[T]) Get(key string) (T, bool)
Get retrieves the value associated with the given key.
Parameters:
- key: The key whose associated value is to be retrieved.
Returns:
- value: The value corresponding to the key (zero value if not found).
- found: A boolean indicating whether the key was found in the repository.
type RouteEntry ¶ added in v0.0.9
type RouteEntry struct {
Method string `json:"method"` // HTTP method (GET, POST, etc.)
URI string `json:"uri"` // URI path for the route
Name string `json:"name"` // Name of the route, if defined
Action string `json:"action"` // Action or controller handling the route
Parameters []string `json:"parameters"` // List of parameters for the route
File string `json:"filename"` // File indicates the file where the route is defined.
Line int `json:"line"` // Line number in the file where the route is defined
}
RouteEntry holds information for an entry for a single route configuration in a laravel application.
type RouteRepository ¶ added in v0.0.9
type RouteRepository = Repository[RouteEntry]
RouteRepository is a type alias for Repository specialized for RouteEntry.