Screw it exporting.
Otherwise we have no way to *set* those fields.
diff --git a/service_client.go b/service_client.go
index 150da60..feed758 100644
--- a/service_client.go
+++ b/service_client.go
@@ -4,25 +4,32 @@
"strings"
)
-// ServiceClient stores details about a specific service that are necessary for further interactions
-// with that service API, as well as utility methods for service implementation.
+// ServiceClient stores details about a specific service that are necessary for further interactions with that service API, as well
+// as utility methods for service implementation.
//
-// Generally, you will acquire a ServiceClient by calling the NewClient() function in the
-// appropriate service package.
+// Generally, you will acquire a ServiceClient by calling the NewClient() function in the appropriate service package.
type ServiceClient struct {
- authority AuthResults
- options AuthOptions
- endpoint string
- tokenID string
+
+ // Authority caches results of the most recent authentication.
+ Authority AuthResults
+
+ // Options remembers the original authentication parameters, if reauthentication is enabled.
+ Options AuthOptions
+
+ // Endpoint is the base URL of the relevant API.
+ Endpoint string
+
+ // TokenID is the most recently valid token issued.
+ TokenID string
}
// ServiceURL constructs a URL for a resource belonging to this client.
func (client *ServiceClient) ServiceURL(parts ...string) string {
- return client.endpoint + strings.Join(parts, "/")
+ return client.Endpoint + strings.Join(parts, "/")
}
// AuthenticatedHeaders returns a map of HTTP headers that are common for all authenticated service
// requests.
func (client *ServiceClient) AuthenticatedHeaders() map[string]string {
- return map[string]string{"X-Auth-Token": client.tokenID}
+ return map[string]string{"X-Auth-Token": client.TokenID}
}