Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# Project variables
# --------------------

MAIN_PATH := ./cmd/artifact_store
MAIN_PATH := ./cmd/artifacts
BUILD_PATH := ./build/package
OUTPUT_PATH := ./output
CONFIG_PATH := ./config
TMP_PATH := ${OUTPUT_PATH}/tmp
BIN_NAME := artifactstore
BIN_NAME := artifacts
DOCKER_FILE_PATH := ./build/package/Dockerfile
DOCKER_TAG := local

Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# artifact-store
# artifacts

Software packages store.

## Overview

This project aims to be API-first, where we utilize [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) along with standard [net/http](https://deepwiki.com/oapi-codegen/oapi-codegen/4.1-standard-http-(nethttp)) to expose a RESTful API.

4 changes: 2 additions & 2 deletions build/package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BIN=artifact-store
ARG CMD=./cmd/artifact_store
ARG BIN=artifacts
ARG CMD=./cmd/artifacts

FROM golang:tip-alpine3.23 AS builder

Expand Down
6 changes: 3 additions & 3 deletions cmd/artifact_store/main.go → cmd/artifacts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"os/signal"
"syscall"

"artifact-store/internal/storage"
"artifact-store/internal/config"
"artifact-store/internal/service"
"artifacts/internal/storage"
"artifacts/internal/config"
"artifacts/internal/service"
)

type CliOpts struct {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module artifact-store
module artifacts

go 1.26

require (
github.com/oapi-codegen/oapi-codegen/v2 v2.6.0
github.com/oapi-codegen/runtime v1.4.0
go.yaml.in/yaml/v4 v4.0.0-rc.4
)

Expand All @@ -18,7 +19,6 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/oapi-codegen/runtime v1.4.0 // indirect
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
Expand Down
4 changes: 2 additions & 2 deletions internal/api/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
openapi_types "github.com/oapi-codegen/runtime/types"

"artifact-store/internal/storage"
"artifact-store/internal/storage/storage_error"
"artifacts/internal/storage"
"artifacts/internal/storage/storage_error"
)

type ArtifactErrorMessage interface {
Expand Down
4 changes: 2 additions & 2 deletions internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestCreate(t *testing.T) {
Storage: StorageConfig{
Backend: "fs",
Fs: FsConfig{
Path: "/tmp/artifact-store/",
Path: "/tmp/artifacts/",
},
},
},
Expand All @@ -33,7 +33,7 @@ func TestCreate(t *testing.T) {
Storage: StorageConfig{
Backend: "fs",
Fs: FsConfig{
Path: "/tmp/artifact-store/",
Path: "/tmp/artifacts/",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ storage:
- nas
- s3
fs:
path: "/tmp/artifact-store/"
path: "/tmp/artifacts/"
6 changes: 3 additions & 3 deletions internal/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"net/http"
"context"

"artifact-store/internal/api"
"artifact-store/internal/config"
"artifact-store/internal/storage"
"artifacts/internal/api"
"artifacts/internal/config"
"artifacts/internal/storage"
)

type WebService struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/backend/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path"
"path/filepath"

"artifact-store/internal/storage/storage_error"
"artifacts/internal/storage/storage_error"
)

type FileSystem struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package storage
import (
"fmt"

"artifact-store/internal/config"
"artifact-store/internal/storage/backend"
"artifacts/internal/config"
"artifacts/internal/storage/backend"
)

type Storage interface {
Expand Down
8 changes: 4 additions & 4 deletions internal/storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"
"os"

"artifact-store/internal/config"
"artifact-store/internal/storage/backend"
"artifacts/internal/config"
"artifacts/internal/storage/backend"
)

func TestCreate(t *testing.T) {
Expand All @@ -22,11 +22,11 @@ func TestCreate(t *testing.T) {
config.StorageConfig{
Backend: "fs",
Fs: config.FsConfig{
Path: "/tmp/artifact-store/",
Path: "/tmp/artifacts/",
},
},
backend.FileSystem{
Path: os.DirFS("/tmp/artifact-store/"),
Path: os.DirFS("/tmp/artifacts/"),
},
false,
},
Expand Down