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
1 change: 1 addition & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
generateReleaseNotes: true
makeLatest: "legacy"
name: "Version ${{ steps.version.outputs.version }}"
immutableCreate: true
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ jobs:
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Test
run: go test ./...
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright © 2024 Louis Royer
Copyright Louis Royer and the NextMN Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
JSON API between SRv6 [controller](https://github.com/nextmn/srv6-ctrl) and [routers](https://github.com/nextmn/srv6).

## Author
Louis Royer
Louis Royer and the NextMN Contributors

## License
MIT
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/nextmn/json-api

go 1.22
go 1.25.5

require (
github.com/gofrs/uuid v4.4.0+incompatible
github.com/gofrs/uuid/v5 v5.4.0
github.com/sirupsen/logrus v1.9.3
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid/v5 v5.4.0 h1:EfbpCTjqMuGyq5ZJwxqzn3Cbr2d0rUZU7v5ycAk/e/0=
github.com/gofrs/uuid/v5 v5.4.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
Expand Down
2 changes: 1 addition & 1 deletion healthcheck/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion healthcheck/healthcheck.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/control_uri.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/fteid.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/message.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
4 changes: 2 additions & 2 deletions jsonapi/message_with_error.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down Expand Up @@ -30,7 +30,7 @@ func (u *MessageWithError) UnmarshalJSON(data []byte) error {
if !ok {
return fmt.Errorf("Missing key `error` while unmarshaling MessageWithError")
}
u.Error = fmt.Errorf(e)
u.Error = fmt.Errorf("%s", e)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/handover_command.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/handover_confirm.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/handover_notify.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/handover_request.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/handover_request_ack.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/handover_required.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/n2_pdu_session_req_msg.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/n2_pdu_session_resp_msg.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/pdu_session_estab_accept_msg.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/pdu_session_estab_req_msg.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/radio_peer_msg.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n1n2/session.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/action.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/backbone_ip.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/gtp_header.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/locator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/match.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/nexthop.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/payload.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/router.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
4 changes: 2 additions & 2 deletions jsonapi/n4tosrv6/router_map.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT

package n4tosrv6

import "github.com/gofrs/uuid"
import "github.com/gofrs/uuid/v5"

type RouterMap map[uuid.UUID]Router
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/rule.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
4 changes: 2 additions & 2 deletions jsonapi/n4tosrv6/rule_map.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT

package n4tosrv6

import "github.com/gofrs/uuid"
import "github.com/gofrs/uuid/v5"

type RuleMap map[uuid.UUID]Rule
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/segment.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi/n4tosrv6/srh.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi_test/control_uri_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi_test/message_with_error_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi_test/n1n2_test/session_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi_test/n4tosrv6_test/backbone_ip_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi_test/n4tosrv6_test/locator_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi_test/n4tosrv6_test/segment_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
2 changes: 1 addition & 1 deletion jsonapi_test/n4tosrv6_test/srh_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Louis Royer and the NextMN contributors. All rights reserved.
// Copyright Louis Royer and the NextMN contributors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
// SPDX-License-Identifier: MIT
Expand Down
Loading