How vouv/srun works
Srun is a command-line client for BIT campus-network access. Users configure credentials, then log in or out, or query account and usage information. The login domain flow discovers the network access ID, obtains a challenge, builds the authenticated portal request, and saves updated session state; logout clears that state. The map separates CLI orchestration, portal logic, protocol/data models, and local account storage. Some request helpers and command implementations were not sampled, so uncertain internal wiring is omitted.
Main entry points: cli.go Command Handlers · core.go Portal Operations · request.go JSONP HTTP · store.go Account Store
Components 13
CLI
- Command Dispatch
cmd/srun/main.go - Command Handlers
cmd/srun/cli.go
Portal Access
- Portal Operations
core/core.go - JSONP HTTP
utils/request.go
Protocol Data
- Portal Hashing
hash/hash.go - Request Builders
model/request.go - Response Models
model/response.go - Usage Formatting
utils/format.go
Local State
- Account Model
model/account.go - Account Store
store/store.go
Other components
- User
- Campus Portal
- Terminal
Connections 15
- User → Command Dispatch: runs command
- Command Dispatch → Command Handlers: dispatches
- Command Handlers → Terminal: reads input
- Command Handlers → Account Store: reads credentials
- Command Handlers → Account Store: writes credentials
- Command Handlers → Portal Operations: invokes operations
- Portal Operations → Campus Portal: requests portal
- Portal Operations → JSONP HTTP: fetches JSONP
- JSONP HTTP → Campus Portal: sends HTTP
- Portal Operations → Request Builders: builds requests
- Portal Operations → Portal Hashing: computes auth fields
- JSONP HTTP → Response Models: decodes responses
- Command Handlers → Usage Formatting: formats usage
- Response Models → Usage Formatting: formats values
- Account Store → Account Model: reads and writes