Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from atc0005/tumbled-results-week2
Browse files Browse the repository at this point in the history
Initial release!
  • Loading branch information
atc0005 authored Jun 9, 2020
2 parents 0ff1879 + 1a288b0 commit 54efc59
Show file tree
Hide file tree
Showing 20 changed files with 2,007 additions and 1 deletion.
98 changes: 98 additions & 0 deletions .github/workflows/lint-and-build-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Copyright 2020 Adam Chalkley
#
# https://github.com/atc0005/go-ezproxy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Validate Codebase

# Run builds for Pull Requests (new, updated)
# `synchronized` seems to equate to pushing new commits to a linked branch
# (whether force-pushed or not)
on:
pull_request:
types: [opened, synchronize]

jobs:
lint_and_build_code:
name: Lint and Build codebase
runs-on: ${{ matrix.os }}
# Default: 360 minutes
timeout-minutes: 10
strategy:
matrix:
# Supported versions of Go
go-version: [1.13.x, 1.14.x]

# Supported LTS and latest version of Ubuntu Linux
#os: [ubuntu-16.04, ubuntu-18.04, ubuntu-latest]

# This should be good enough until we learn otherwise
os: [ubuntu-latest]

steps:
- name: Set up Go
# https://github.com/actions/setup-go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
id: go

# This could prove useful if we need to troubleshoot odd results and
# tie them back to a specific version of Go
- name: Print go version
run: |
go version
- name: Check out code into the Go module directory
uses: actions/checkout@v1

# NOTE: Disabled in favor of top-level `vendor` folder
#
# - name: Get dependencies
# run: |
# go get -v -t -d ./...

# Force tests to run early as it isn't worth doing much else if the
# tests fail to run properly.
# Note: The `vendor` top-level folder appears to be skipped by default.
- name: Run all tests
run: go test -mod=vendor -v ./...

- name: Install Go linting tools
run: |
# add executables installed with go get to PATH
# TODO: this will hopefully be fixed by
# https://github.com/actions/setup-go/issues/14
export PATH=${PATH}:$(go env GOPATH)/bin
make lintinstall
- name: Install Ubuntu packages
if: contains(matrix.os, 'ubuntu')
run: sudo apt update && sudo apt install -y --no-install-recommends make gcc

- name: Run Go linting tools using project Makefile
run: |
# add executables installed with go get to PATH
# TODO: this will hopefully be fixed by
# https://github.com/actions/setup-go/issues/14
export PATH=${PATH}:$(go env GOPATH)/bin
make linting
- name: Build with (mostly) default options
# Note: We use the `-mod=vendor` flag to explicitly request that our
# top-level vendor folder be used instead of fetching remote packages
run: go build -v -mod=vendor ./...

- name: Build using project Makefile
run: make all
56 changes: 56 additions & 0 deletions .github/workflows/lint-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2020 Adam Chalkley
#
# https://github.com/atc0005/go-ezproxy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Validate Docs

# Run Workflow for Pull Requests (new, updated)
# `synchronized` seems to equate to pushing new commits to a linked branch
# (whether force-pushed or not)
on:
pull_request:
types: [opened, synchronize]

jobs:
lint_markdown:
name: Lint Markdown files
runs-on: "ubuntu-latest"
# Default: 360 minutes
timeout-minutes: 10

steps:
- name: Setup Node
# https://github.com/actions/setup-node
uses: actions/setup-node@v1
with:
node-version: "10.x"

- name: Install Markdown linting tools
run: |
npm install markdownlint --save-dev
npm install -g markdownlint-cli
- name: Check out code
uses: actions/checkout@v1

- name: Run Markdown linting tools
# The `.markdownlint.yml` file specifies config settings for this
# linter, including which linting rules to ignore.
#
# Note: Explicitly ignoring top-level vendor folder; we do not want
# potential linting issues in bundled documentation to fail linting CI
# runs for *our* documentation
run: |
markdownlint '**/*.md' --ignore node_modules --ignore vendor
33 changes: 33 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2020 Adam Chalkley
#
# https://github.com/atc0005/go-ezproxy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

linters:
enable:
- depguard
- dogsled
- dupl
- goconst
- gocritic
- gofmt
- goimports
- golint
- gosec
- maligned
- misspell
- prealloc
- scopelint
- stylecheck
- unconvert
31 changes: 31 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2020 Adam Chalkley
#
# https://github.com/atc0005/go-ezproxy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# https://github.com/igorshubovych/markdownlint-cli#configuration
# https://github.com/DavidAnson/markdownlint#optionsconfig

# Setting the special default rule to true or false includes/excludes all
# rules by default.
"default": true

# We know that line lengths will be long in the main README file, so don't
# report those cases.
"MD013": false

# Don't complain if sub-heading names are duplicated since this is a common
# practice in CHANGELOG.md (e.g., "Fixed").
"MD024":
"siblings_only": true
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Changelog

## Overview

All notable changes to this project will be documented in this file.

The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Please [open an issue][repo-url-issues] for any
deviations that you spot; I'm still learning!.

## Types of changes

The following types of changes will be recorded in this file:

- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [Unreleased]

- placeholder

## [v0.1.0] - 2020-06-09

Initial release!

This release provides an early release version of a library intended for use
with the processing of EZproxy related files and sessions. This library was
developed specifically to support the development of an in-progress
application, so the full context may not be entirely clear until that
application is released (currently pending review).

### Added

- generate a list of audit records for session-related events
- for all usernames
- for a specific username

- generate a list of active sessions using audit log
- using entires without a corresponding logout event type

- generate a list of active sessions using active file
- for all usernames
- for a specific username

- terminate user sessions
- single user session
- bulk user sessions

- Go modules support (vs classic `GOPATH` setup)

### Missing

- Anything to do with traffic log entries
- Examples
- the in-progress [atc0005/brick][related-brick-project] should serve well
for this once it is released

<!-- Version header ref links here -->

[Unreleased]: https://github.com/atc0005/go-ezproxy/compare/v0.1.0...HEAD
[v0.1.0]: https://github.com/atc0005/go-ezproxy/releases/tag/v0.1.0

<!-- General footnotes here -->

[repo-url-home]: <https://github.com/atc0005/go-ezproxy> "This project's GitHub repo"
[repo-url-issues]: <https://github.com/atc0005/go-ezproxy/issues> "This project's issues list"
[repo-url-release-latest]: <https://github.com/atc0005/go-ezproxy/releases/latest> "This project's latest release"

[docs-homepage]: <https://godoc.org/github.com/atc0005/go-ezproxy> "GoDoc coverage"

[related-brick-project]: <https://github.com/atc0005/brick> "atc0005/brick project URL"
Loading

0 comments on commit 54efc59

Please sign in to comment.