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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 6 additions & 11 deletions capabilities/access/claim.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
package access
//go:build !codegen

import (
adm "github.com/fil-forge/libforge/capabilities/access/datamodel"
cdm "github.com/fil-forge/libforge/capabilities/datamodel"
"github.com/fil-forge/ucantone/validator/bindcap"
)
package access

type (
ClaimArguments = cdm.UnitModel
ClaimOK = adm.ClaimOKModel
)
import "github.com/fil-forge/libforge/capabilities"

const ClaimCommand = "/access/claim"

type ClaimArguments = capabilities.Unit

// Claim can be invoked by an agent to claim a set of delegations from the
// account.
var Claim, _ = bindcap.New[*ClaimArguments](ClaimCommand)
var Claim = capabilities.MustNew[*ClaimArguments](ClaimCommand)
14 changes: 7 additions & 7 deletions capabilities/access/confirm.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//go:build !codegen

package access

import (
adm "github.com/fil-forge/libforge/capabilities/access/datamodel"
"github.com/fil-forge/libforge/capabilities"
"github.com/fil-forge/ucantone/errors"
"github.com/fil-forge/ucantone/validator/bindcap"
)

type (
ConfirmArguments = adm.ConfirmArgumentsModel
ConfirmOK = adm.ConfirmOKModel
)
// ConfirmOK mirrors ClaimOK — confirming an access request grants the same
// shape of delegations bundle as claiming them.
type ConfirmOK = ClaimOK

// ConfirmMetaKey is the key in metadata in any delegation created by a
// successful access request. The value is a link back to the `/access/confirm`
Expand All @@ -19,7 +19,7 @@ const ConfirmMetaKey = "accessConfirm"
const ConfirmCommand = "/access/confirm"

// Confirm can be invoked by an agent to confirm an access request.
var Confirm, _ = bindcap.New[*ConfirmArguments](ConfirmCommand)
var Confirm = capabilities.MustNew[*ConfirmArguments](ConfirmCommand)

const (
InvalidAccessConfirmSubjectErrorName = "InvalidAccessConfirmSubject"
Expand Down
8 changes: 0 additions & 8 deletions capabilities/access/datamodel/claim.go

This file was deleted.

16 changes: 0 additions & 16 deletions capabilities/access/datamodel/confirm.go

This file was deleted.

8 changes: 0 additions & 8 deletions capabilities/access/datamodel/delegate.go

This file was deleted.

28 changes: 0 additions & 28 deletions capabilities/access/datamodel/gen/main.go

This file was deleted.

28 changes: 0 additions & 28 deletions capabilities/access/datamodel/request.go

This file was deleted.

Loading
Loading