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

Commit 54efc59

Browse files
authored
Merge pull request #2 from atc0005/tumbled-results-week2
Initial release!
2 parents 0ff1879 + 1a288b0 commit 54efc59

File tree

20 files changed

+2007
-1
lines changed

20 files changed

+2007
-1
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Copyright 2020 Adam Chalkley
2+
#
3+
# https://github.com/atc0005/go-ezproxy
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
name: Validate Codebase
18+
19+
# Run builds for Pull Requests (new, updated)
20+
# `synchronized` seems to equate to pushing new commits to a linked branch
21+
# (whether force-pushed or not)
22+
on:
23+
pull_request:
24+
types: [opened, synchronize]
25+
26+
jobs:
27+
lint_and_build_code:
28+
name: Lint and Build codebase
29+
runs-on: ${{ matrix.os }}
30+
# Default: 360 minutes
31+
timeout-minutes: 10
32+
strategy:
33+
matrix:
34+
# Supported versions of Go
35+
go-version: [1.13.x, 1.14.x]
36+
37+
# Supported LTS and latest version of Ubuntu Linux
38+
#os: [ubuntu-16.04, ubuntu-18.04, ubuntu-latest]
39+
40+
# This should be good enough until we learn otherwise
41+
os: [ubuntu-latest]
42+
43+
steps:
44+
- name: Set up Go
45+
# https://github.com/actions/setup-go
46+
uses: actions/setup-go@v1
47+
with:
48+
go-version: ${{ matrix.go-version }}
49+
id: go
50+
51+
# This could prove useful if we need to troubleshoot odd results and
52+
# tie them back to a specific version of Go
53+
- name: Print go version
54+
run: |
55+
go version
56+
57+
- name: Check out code into the Go module directory
58+
uses: actions/checkout@v1
59+
60+
# NOTE: Disabled in favor of top-level `vendor` folder
61+
#
62+
# - name: Get dependencies
63+
# run: |
64+
# go get -v -t -d ./...
65+
66+
# Force tests to run early as it isn't worth doing much else if the
67+
# tests fail to run properly.
68+
# Note: The `vendor` top-level folder appears to be skipped by default.
69+
- name: Run all tests
70+
run: go test -mod=vendor -v ./...
71+
72+
- name: Install Go linting tools
73+
run: |
74+
# add executables installed with go get to PATH
75+
# TODO: this will hopefully be fixed by
76+
# https://github.com/actions/setup-go/issues/14
77+
export PATH=${PATH}:$(go env GOPATH)/bin
78+
make lintinstall
79+
80+
- name: Install Ubuntu packages
81+
if: contains(matrix.os, 'ubuntu')
82+
run: sudo apt update && sudo apt install -y --no-install-recommends make gcc
83+
84+
- name: Run Go linting tools using project Makefile
85+
run: |
86+
# add executables installed with go get to PATH
87+
# TODO: this will hopefully be fixed by
88+
# https://github.com/actions/setup-go/issues/14
89+
export PATH=${PATH}:$(go env GOPATH)/bin
90+
make linting
91+
92+
- name: Build with (mostly) default options
93+
# Note: We use the `-mod=vendor` flag to explicitly request that our
94+
# top-level vendor folder be used instead of fetching remote packages
95+
run: go build -v -mod=vendor ./...
96+
97+
- name: Build using project Makefile
98+
run: make all

.github/workflows/lint-docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright 2020 Adam Chalkley
2+
#
3+
# https://github.com/atc0005/go-ezproxy
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
name: Validate Docs
18+
19+
# Run Workflow for Pull Requests (new, updated)
20+
# `synchronized` seems to equate to pushing new commits to a linked branch
21+
# (whether force-pushed or not)
22+
on:
23+
pull_request:
24+
types: [opened, synchronize]
25+
26+
jobs:
27+
lint_markdown:
28+
name: Lint Markdown files
29+
runs-on: "ubuntu-latest"
30+
# Default: 360 minutes
31+
timeout-minutes: 10
32+
33+
steps:
34+
- name: Setup Node
35+
# https://github.com/actions/setup-node
36+
uses: actions/setup-node@v1
37+
with:
38+
node-version: "10.x"
39+
40+
- name: Install Markdown linting tools
41+
run: |
42+
npm install markdownlint --save-dev
43+
npm install -g markdownlint-cli
44+
45+
- name: Check out code
46+
uses: actions/checkout@v1
47+
48+
- name: Run Markdown linting tools
49+
# The `.markdownlint.yml` file specifies config settings for this
50+
# linter, including which linting rules to ignore.
51+
#
52+
# Note: Explicitly ignoring top-level vendor folder; we do not want
53+
# potential linting issues in bundled documentation to fail linting CI
54+
# runs for *our* documentation
55+
run: |
56+
markdownlint '**/*.md' --ignore node_modules --ignore vendor

.golangci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2020 Adam Chalkley
2+
#
3+
# https://github.com/atc0005/go-ezproxy
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
linters:
18+
enable:
19+
- depguard
20+
- dogsled
21+
- dupl
22+
- goconst
23+
- gocritic
24+
- gofmt
25+
- goimports
26+
- golint
27+
- gosec
28+
- maligned
29+
- misspell
30+
- prealloc
31+
- scopelint
32+
- stylecheck
33+
- unconvert

.markdownlint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2020 Adam Chalkley
2+
#
3+
# https://github.com/atc0005/go-ezproxy
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# https://github.com/igorshubovych/markdownlint-cli#configuration
18+
# https://github.com/DavidAnson/markdownlint#optionsconfig
19+
20+
# Setting the special default rule to true or false includes/excludes all
21+
# rules by default.
22+
"default": true
23+
24+
# We know that line lengths will be long in the main README file, so don't
25+
# report those cases.
26+
"MD013": false
27+
28+
# Don't complain if sub-heading names are duplicated since this is a common
29+
# practice in CHANGELOG.md (e.g., "Fixed").
30+
"MD024":
31+
"siblings_only": true

CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Changelog
2+
3+
## Overview
4+
5+
All notable changes to this project will be documented in this file.
6+
7+
The format is based on [Keep a
8+
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
9+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
10+
11+
Please [open an issue][repo-url-issues] for any
12+
deviations that you spot; I'm still learning!.
13+
14+
## Types of changes
15+
16+
The following types of changes will be recorded in this file:
17+
18+
- `Added` for new features.
19+
- `Changed` for changes in existing functionality.
20+
- `Deprecated` for soon-to-be removed features.
21+
- `Removed` for now removed features.
22+
- `Fixed` for any bug fixes.
23+
- `Security` in case of vulnerabilities.
24+
25+
## [Unreleased]
26+
27+
- placeholder
28+
29+
## [v0.1.0] - 2020-06-09
30+
31+
Initial release!
32+
33+
This release provides an early release version of a library intended for use
34+
with the processing of EZproxy related files and sessions. This library was
35+
developed specifically to support the development of an in-progress
36+
application, so the full context may not be entirely clear until that
37+
application is released (currently pending review).
38+
39+
### Added
40+
41+
- generate a list of audit records for session-related events
42+
- for all usernames
43+
- for a specific username
44+
45+
- generate a list of active sessions using audit log
46+
- using entires without a corresponding logout event type
47+
48+
- generate a list of active sessions using active file
49+
- for all usernames
50+
- for a specific username
51+
52+
- terminate user sessions
53+
- single user session
54+
- bulk user sessions
55+
56+
- Go modules support (vs classic `GOPATH` setup)
57+
58+
### Missing
59+
60+
- Anything to do with traffic log entries
61+
- Examples
62+
- the in-progress [atc0005/brick][related-brick-project] should serve well
63+
for this once it is released
64+
65+
<!-- Version header ref links here -->
66+
67+
[Unreleased]: https://github.com/atc0005/go-ezproxy/compare/v0.1.0...HEAD
68+
[v0.1.0]: https://github.com/atc0005/go-ezproxy/releases/tag/v0.1.0
69+
70+
<!-- General footnotes here -->
71+
72+
[repo-url-home]: <https://github.com/atc0005/go-ezproxy> "This project's GitHub repo"
73+
[repo-url-issues]: <https://github.com/atc0005/go-ezproxy/issues> "This project's issues list"
74+
[repo-url-release-latest]: <https://github.com/atc0005/go-ezproxy/releases/latest> "This project's latest release"
75+
76+
[docs-homepage]: <https://godoc.org/github.com/atc0005/go-ezproxy> "GoDoc coverage"
77+
78+
[related-brick-project]: <https://github.com/atc0005/brick> "atc0005/brick project URL"

0 commit comments

Comments
 (0)