Skip to content

Commit

Permalink
Add project skeleton
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Shishkin <me@teran.dev>
  • Loading branch information
teran committed Jul 6, 2024
1 parent 50e2fff commit c23f838
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
# Go workspace file
go.work
go.work.sum

# Build binaries
/archived
/dist/
74 changes: 74 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
version: 2
builds:
- id: archived-access
main: ./cmd/access
binary: archived-access
ldflags:
- -s -w -X main.appVersion={{.Version}} -X main.buildTimestamp={{.Date}}
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
goamd64: ["v1", "v2", "v3"]
goarm: ["7"]
mod_timestamp: "{{ .CommitTimestamp }}"
- id: archived-cli
main: ./cmd/cli
binary: archived-cli
ldflags:
- -s -w -X main.appVersion={{.Version}} -X main.buildTimestamp={{.Date}}
env:
- CGO_ENABLED=0
goos:
- darwin
- dragonfly
- freebsd
- linux
- netbsd
- openbsd
- solaris
- windows
goarch:
# x86
- amd64
- "386"

# ARM
- arm64
- arm

# MIPS
- mips64
- mips64le
- mips
- mipsle
goamd64: ["v1", "v2", "v3"]
goarm: ["6", "7"]
gomips: ["hardfloat", "softfloat"]
mod_timestamp: "{{ .CommitTimestamp }}"
- id: archived-manage
main: ./cmd/manage
binary: archived-manage
ldflags:
- -s -w -X main.appVersion={{.Version}} -X main.buildTimestamp={{.Date}}
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
goamd64: ["v1", "v2", "v3"]
goarm: ["7"]
mod_timestamp: "{{ .CommitTimestamp }}"
archives:
- format: binary
checksum:
name_template: "checksums.txt"
algorithm: sha256
split: false
disable: false
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Contributing guidelines

archived is open to contribution in any possible way. If you'd like to help
project feel free to:

* Send patches to improve archived functionality
* Fix some bugs
* Write some documentation
* Propose any changes
* Your own way ;)

That's all for now, any other particular case could be discused in Discussions
and/or issues.

But please don't forget to write tests for your code and follow existent
practices ;)
11 changes: 11 additions & 0 deletions Dockerfile.access
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.20.0 AS certificates

RUN apk add --update --no-cache \
ca-certificates=20240226-r0

FROM scratch

COPY --from=certificates /etc/ssl/cert.pem /etc/ssl/cert.pem
COPY --chmod=0755 --chown=root:root dist/archived-access_linux_arm64/archived-access /archived-access

ENTRYPOINT [ "/archived-access" ]
11 changes: 11 additions & 0 deletions Dockerfile.manage
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.20.0 AS certificates

RUN apk add --update --no-cache \
ca-certificates=20240226-r0

FROM scratch

COPY --from=certificates /etc/ssl/cert.pem /etc/ssl/cert.pem
COPY --chmod=0755 --chown=root:root dist/archived-manage_linux_amd64_v3/archived-manage /archived-manage

ENTRYPOINT [ "/archived-manage" ]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# archived

Cloud native service so store versioned data in space-efficient manner
14 changes: 14 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Security Policy

## Supported Versions

archived uses trunk-based development model with periodic semver releases marked
against master branch right when the target feature is completed for particular
milestone. Which means the most recent release is considered stable, secure and
contains all the most recent features.

## Reporting a Vulnerability

To make a report please use GitHub security section and click "Report a vulnerability"
button to fill details. Please don't forget to add archived version, Ceph version
and any other related details to reproduce the issue.
10 changes: 10 additions & 0 deletions cmd/access/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package main

var (
appVersion = "n/a (dev build)"
buildTimestamp = "undefined"
)

func main() {
panic("not implemented")
}
10 changes: 10 additions & 0 deletions cmd/cli/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package main

var (
appVersion = "n/a (dev build)"
buildTimestamp = "undefined"
)

func main() {
panic("not implemented")
}
10 changes: 10 additions & 0 deletions cmd/manage/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package manage

var (
appVersion = "n/a (dev build)"
buildTimestamp = "undefined"
)

func main() {
panic("not implemented")
}
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/teran/archived

go 1.22.5

0 comments on commit c23f838

Please sign in to comment.