Merge pull request #302 from smashwilson/root-docs-pass
Editing pass over godocs in the root package.
diff --git a/openstack/identity/v2/users/requests.go b/openstack/identity/v2/users/requests.go
index e6bb591..b882d7d 100644
--- a/openstack/identity/v2/users/requests.go
+++ b/openstack/identity/v2/users/requests.go
@@ -28,7 +28,9 @@
Disabled EnabledState = &iFalse
)
-type commonOpts struct {
+// CommonOpts are the parameters that are shared between CreateOpts and
+// UpdateOpts
+type CommonOpts struct {
// Either a name or username is required. When provided, the value must be
// unique or a 409 conflict error will be returned. If you provide a name but
// omit a username, the latter will be set to the former; and vice versa.
@@ -45,7 +47,7 @@
}
// CreateOpts represents the options needed when creating new users.
-type CreateOpts commonOpts
+type CreateOpts CommonOpts
// CreateOptsBuilder describes struct types that can be accepted by the Create call.
type CreateOptsBuilder interface {
@@ -118,7 +120,7 @@
}
// UpdateOpts specifies the base attributes that may be updated on an existing server.
-type UpdateOpts commonOpts
+type UpdateOpts CommonOpts
// ToUserUpdateMap formats an UpdateOpts structure into a request body.
func (opts UpdateOpts) ToUserUpdateMap() map[string]interface{} {
diff --git a/rackspace/identity/v2/users/delegate.go b/rackspace/identity/v2/users/delegate.go
index 07c7c97..94b97dc 100644
--- a/rackspace/identity/v2/users/delegate.go
+++ b/rackspace/identity/v2/users/delegate.go
@@ -14,7 +14,9 @@
return os.List(client)
}
-type commonOpts struct {
+// CommonOpts are the options which are shared between CreateOpts and
+// UpdateOpts
+type CommonOpts struct {
// Required. The username to assign to the user. When provided, the username
// must:
// - start with an alphabetical (A-Za-z) character
@@ -43,7 +45,7 @@
}
// CreateOpts represents the options needed when creating new users.
-type CreateOpts commonOpts
+type CreateOpts CommonOpts
// ToUserCreateMap assembles a request body based on the contents of a CreateOpts.
func (opts CreateOpts) ToUserCreateMap() (map[string]interface{}, error) {
@@ -91,7 +93,7 @@
}
// UpdateOpts specifies the base attributes that may be updated on an existing server.
-type UpdateOpts commonOpts
+type UpdateOpts CommonOpts
// ToUserUpdateMap formats an UpdateOpts structure into a request body.
func (opts UpdateOpts) ToUserUpdateMap() map[string]interface{} {