Rework Error interface

Package Errors:
- add function to check & cast error interface into golib Error interface
- update CodeError type to simplify management & error creation
- add function to simplify call of Error function from a generic error interface
- remove some useless function from Error interface

All Other Packages:
- apply change of package Errors into all other packages
This commit is contained in:
Nicolas JUHEL
2023-08-25 15:48:35 +02:00
parent a672f6ed10
commit 984ba51587
189 changed files with 1283 additions and 1435 deletions

View File

@@ -27,15 +27,14 @@ package client
import (
hscvrs "github.com/hashicorp/go-version"
liberr "github.com/nabbar/golib/errors"
)
type ArtifactManagement interface {
ListReleasesOrder() (releases map[int]map[int]hscvrs.Collection, err liberr.Error)
ListReleasesMajor(major int) (releases hscvrs.Collection, err liberr.Error)
ListReleasesMinor(major, minor int) (releases hscvrs.Collection, err liberr.Error)
ListReleasesOrder() (releases map[int]map[int]hscvrs.Collection, err error)
ListReleasesMajor(major int) (releases hscvrs.Collection, err error)
ListReleasesMinor(major, minor int) (releases hscvrs.Collection, err error)
GetLatest() (release *hscvrs.Version, err liberr.Error)
GetLatestMajor(major int) (release *hscvrs.Version, err liberr.Error)
GetLatestMinor(major, minor int) (release *hscvrs.Version, err liberr.Error)
GetLatest() (release *hscvrs.Version, err error)
GetLatestMajor(major int) (release *hscvrs.Version, err error)
GetLatestMinor(major, minor int) (release *hscvrs.Version, err error)
}