From 132c939d245a45cdeca84e8dc0b84ad281bfd229 Mon Sep 17 00:00:00 2001
From: ForrestWeston <forrest@protocol.ai>
Date: Mon, 22 Jan 2018 14:44:46 -0800
Subject: [PATCH] interface docs for coreapi interface

License: MIT
Signed-off-by: ForrestWeston <forrest@protocol.ai>
---
 core/coreapi/interface/interface.go | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/core/coreapi/interface/interface.go b/core/coreapi/interface/interface.go
index cdbb2508b..720f935e2 100644
--- a/core/coreapi/interface/interface.go
+++ b/core/coreapi/interface/interface.go
@@ -17,9 +17,13 @@ import (
 // Path is a generic wrapper for paths used in the API. A path can be resolved
 // to a CID using one of Resolve functions in the API.
 type Path interface {
+	// String returns the path as a string.
 	String() string
+	// Cid returns cid referred to by path
 	Cid() *cid.Cid
+	// Root returns cid of root path
 	Root() *cid.Cid
+	// Resolved returns whether path has been fully resolved
 	Resolved() bool
 }
 
@@ -33,22 +37,31 @@ type Reader interface {
 	io.Closer
 }
 
+// IpnsEntry specifies the interface to IpnsEntries
 type IpnsEntry interface {
+	// Name returns IpnsEntry name
 	Name() string
+	// Value returns IpnsEntry value
 	Value() Path
 }
 
+// Key specifies the interface to Keys in KeyAPI Keystore
 type Key interface {
+	// Key returns key name
 	Name() string
+	// Path returns key path
 	Path() Path
 }
 
 // CoreAPI defines an unified interface to IPFS for Go programs.
 type CoreAPI interface {
-	// Unixfs returns an implementation of Unixfs API
+	// Unixfs returns an implementation of Unixfs API.
 	Unixfs() UnixfsAPI
+	// Dag returns an implementation of Dag API.
 	Dag() DagAPI
+	// Name returns an implementation of Name API.
 	Name() NameAPI
+	// Key returns an implementation of Key API.
 	Key() KeyAPI
 
 	// ResolvePath resolves the path using Unixfs resolver
-- 
GitLab