Upgrade to kit v0.3.0

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-04-03 10:56:06 +02:00
parent 8adf26ad20
commit f17fb7bf49
191 changed files with 1617 additions and 1617 deletions

View File

@@ -99,7 +99,7 @@ func (s AccountService) ChangeEmail(ctx context.Context, identityID gid.GID, req
return s.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
identity := &coredata.Identity{}
err := identity.LoadByID(ctx, tx, identityID)
if err != nil {
@@ -162,7 +162,7 @@ func (s AccountService) VerifyEmail(ctx context.Context, token string) error {
return s.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
identity := &coredata.Identity{}
err := identity.LoadByID(ctx, tx, payload.Data.IdentityID)
if err != nil {
@@ -206,7 +206,7 @@ func (s *AccountService) ListPendingInvitations(
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, conn pg.Querier) error {
profile := coredata.MembershipProfile{}
err := profile.LoadByID(ctx, conn, scope, userID)
if err != nil {
@@ -242,7 +242,7 @@ func (s AccountService) ChangePassword(ctx context.Context, identityID gid.GID,
return s.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
identity := &coredata.Identity{}
err := identity.LoadByID(ctx, tx, identityID)
if err != nil {
@@ -287,7 +287,7 @@ func (s AccountService) CountSessions(ctx context.Context, identityID gid.GID) (
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) (err error) {
func(ctx context.Context, conn pg.Querier) (err error) {
sessions := coredata.Sessions{}
count, err = sessions.CountByIdentityID(ctx, conn, identityID)
if err != nil {
@@ -310,7 +310,7 @@ func (s AccountService) ListSessions(
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, conn pg.Querier) error {
err := sessions.LoadByIdentityID(ctx, conn, identityID, cursor)
if err != nil {
return fmt.Errorf("cannot load sessions: %w", err)
@@ -332,7 +332,7 @@ func (s AccountService) GetIdentity(ctx context.Context, identityID gid.GID) (*c
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, conn pg.Querier) error {
err := identity.LoadByID(ctx, conn, identityID)
if err != nil {
if err == coredata.ErrResourceNotFound {
@@ -361,7 +361,7 @@ func (s AccountService) UpdateIdentity(ctx context.Context, identityID gid.GID,
err := s.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
err := identity.LoadByID(ctx, tx, identityID)
if err != nil {
if err == coredata.ErrResourceNotFound {
@@ -397,7 +397,7 @@ func (s AccountService) ListPersonalAPIKeys(
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, conn pg.Querier) error {
err := personalAccessTokens.LoadByIdentityID(ctx, conn, identityID)
if err != nil {
return fmt.Errorf("cannot load personal access tokens: %w", err)
@@ -419,7 +419,7 @@ func (s AccountService) CountPersonalAPIKeys(ctx context.Context, identityID gid
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) (err error) {
func(ctx context.Context, conn pg.Querier) (err error) {
personalAccessTokens := coredata.PersonalAPIKeys{}
count, err = personalAccessTokens.CountByIdentityID(ctx, conn, identityID)
if err != nil {
@@ -441,7 +441,7 @@ func (s *AccountService) RevealPersonalAPIKeyToken(
err := s.pg.WithTx(
ctx,
func(tx pg.Conn) (err error) {
func(ctx context.Context, tx pg.Tx) (err error) {
personalAPIKey := &coredata.PersonalAPIKey{}
if err := personalAPIKey.LoadByID(ctx, tx, personalAPIKeyID); err != nil {
if err == coredata.ErrResourceNotFound {
@@ -481,7 +481,7 @@ func (s AccountService) GetIdentityForMembership(ctx context.Context, membership
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, conn pg.Querier) error {
membership := &coredata.Membership{}
err := membership.LoadByID(ctx, conn, scope, membershipID)
if err != nil {
@@ -525,7 +525,7 @@ func (s *AccountService) CreatePersonalAPIKey(
err := s.pg.WithTx(
ctx,
func(tx pg.Conn) (err error) {
func(ctx context.Context, tx pg.Tx) (err error) {
now := time.Now()
personalAPIKey = &coredata.PersonalAPIKey{
@@ -567,7 +567,7 @@ func (s *AccountService) DeletePersonalAPIKey(
) error {
return s.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
personalAPIKey := &coredata.PersonalAPIKey{}
err := personalAPIKey.LoadByID(ctx, tx, personalAPIKeyID)
if err != nil {
@@ -602,7 +602,7 @@ func (s AccountService) ListOrganizations(ctx context.Context, identityID gid.GI
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, conn pg.Querier) error {
err := organizations.LoadByIdentityID(ctx, conn, coredata.NewNoScope(), identityID, cursor)
if err != nil {
return fmt.Errorf("cannot load organizations: %w", err)
@@ -628,7 +628,7 @@ func (s AccountService) GetMembershipForOrganization(
err := s.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
identity := &coredata.Identity{}
if err := identity.LoadByID(ctx, tx, identityID); err != nil {
@@ -668,7 +668,7 @@ func (s AccountService) ListSAMLConfigurationsForEmail(
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, conn pg.Querier) error {
err := samlConfigurations.LoadVerifiedByEmailDomain(ctx, conn, email.Domain())
if err != nil {
return fmt.Errorf("cannot load saml configurations: %w", err)
@@ -695,7 +695,7 @@ func (s AccountService) CountSAMLConfigurationsForEmail(
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) (err error) {
func(ctx context.Context, conn pg.Querier) (err error) {
count, err = samlConfigurations.CountVerifiedByEmailDomain(ctx, conn, email.Domain())
if err != nil {
return fmt.Errorf("cannot count saml configurations: %w", err)
@@ -723,7 +723,7 @@ func (s *AccountService) ListProfilesForIdentity(
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, conn pg.Querier) error {
if err := profiles.LoadByIdentityID(ctx, conn, identityID, cursor, filter); err != nil {
return fmt.Errorf("cannot load profiles: %w", err)
}
@@ -750,7 +750,7 @@ func (s AccountService) CountProfiles(
err := s.pg.WithConn(
ctx,
func(conn pg.Conn) (err error) {
func(ctx context.Context, conn pg.Querier) (err error) {
profiles := coredata.MembershipProfiles{}
count, err = profiles.CountByIdentityID(ctx, conn, identityID, filter)
if err != nil {