Documentation ¶
Index ¶
- Constants
- func NewEthClient() *ethclient.Client
- type CheckSessionParams
- type CreateAccessContextParams
- type ErrEthClient
- type GrantRoleParams
- type HasRoleParams
- type RegisterResourceParams
- type Service
- func (s Service) CheckSession(ctx context.Context, params CheckSessionParams) (bool, error)
- func (s Service) CreateAccessContext(ctx context.Context, params CreateAccessContextParams) (*types.Receipt, error)
- func (s Service) GetAccessContextAddress(id common.Hash) (persist.Address, error)
- func (s Service) GrantRole(ctx context.Context, params GrantRoleParams) (*types.Receipt, error)
- func (s Service) HasRole(ctx context.Context, params HasRoleParams) (bool, error)
- func (s Service) RegisterResource(ctx context.Context, params RegisterResourceParams) (*types.Receipt, error)
- func (s Service) StartSession(ctx context.Context, params StartSessionParams) (*types.Receipt, error)
- func (s Service) Status() framework.Status
- func (s Service) Type() framework.Type
- type StartSessionParams
- type Wallet
Constants ¶
View Source
const (
GethSocketOpName = "geth.wss"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrEthClient ¶
type ErrEthClient struct {
Err error
}
func (ErrEthClient) Error ¶
func (e ErrEthClient) Error() string
type GrantRoleParams ¶
type GrantRoleParams struct { RoleIdentifier persist.RoleIdentifier DID common.Hash PolicyIdentifier persist.PolicyIdentifier Proof contracts.IPolicyVerifierProof Inputs [20]*big.Int }
type HasRoleParams ¶
type RegisterResourceParams ¶
type Service ¶
type Service struct { Wallet *Wallet ContextHandler persist.Address SessionRegistry persist.Address }
func NewRPCService ¶
func (Service) CheckSession ¶
CheckSession verifies a session
func (Service) CreateAccessContext ¶
func (s Service) CreateAccessContext(ctx context.Context, params CreateAccessContextParams) (*types.Receipt, error)
CreateAccessContext creates a new access context
func (Service) GetAccessContextAddress ¶
GetAccessContextAddress creates a new access context
func (Service) RegisterResource ¶
func (s Service) RegisterResource(ctx context.Context, params RegisterResourceParams) (*types.Receipt, error)
RegisterResource creates a new access context
func (Service) StartSession ¶
func (s Service) StartSession(ctx context.Context, params StartSessionParams) (*types.Receipt, error)
StartSession starts a session
type StartSessionParams ¶
type Wallet ¶
type Wallet struct { ChainID *big.Int PrivateKey *ecdsa.PrivateKey PublicKey *ecdsa.PublicKey Address common.Address Client *ethclient.Client }
func (Wallet) GetDIDHash ¶
func (Wallet) ToCallOpts ¶
func (Wallet) ToTransactOpts ¶
func (w Wallet) ToTransactOpts() (*bind.TransactOpts, error)
Click to show internal directories.
Click to hide internal directories.