5736ac1d9d
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
25 lines
434 B
Go
25 lines
434 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/libp2p/go-libp2p-core/peer"
|
|
)
|
|
|
|
type Struct struct {
|
|
Internal struct {
|
|
ID func(context.Context) (peer.ID, error)
|
|
Version func(context.Context) (Version, error)
|
|
}
|
|
}
|
|
|
|
func (c *Struct) ID(ctx context.Context) (peer.ID, error) {
|
|
return c.Internal.ID(ctx)
|
|
}
|
|
|
|
func (c *Struct) Version(ctx context.Context) (Version, error) {
|
|
return c.Internal.Version(ctx)
|
|
}
|
|
|
|
var _ API = &Struct{}
|