...

Source file src/github.com/go-kivik/kivik/v4/security.go

Documentation: github.com/go-kivik/kivik/v4

     1  // Licensed under the Apache License, Version 2.0 (the "License"); you may not
     2  // use this file except in compliance with the License. You may obtain a copy of
     3  // the License at
     4  //
     5  //  http://www.apache.org/licenses/LICENSE-2.0
     6  //
     7  // Unless required by applicable law or agreed to in writing, software
     8  // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
     9  // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    10  // License for the specific language governing permissions and limitations under
    11  // the License.
    12  
    13  package kivik
    14  
    15  // Members represents the members of a database security document.
    16  type Members struct {
    17  	Names []string `json:"names,omitempty"`
    18  	Roles []string `json:"roles,omitempty"`
    19  }
    20  
    21  // Security represents a database security document.
    22  type Security struct {
    23  	Admins  Members `json:"admins,omitempty"`
    24  	Members Members `json:"members,omitempty"`
    25  
    26  	// Database permissions for Cloudant users and/or API keys. This field is
    27  	// only used or populated by IBM Cloudant. See the [Cloudant documentation]
    28  	// for details.
    29  	//
    30  	// [Cloudant documentation]: https://cloud.ibm.com/apidocs/cloudant#getsecurity
    31  	Cloudant map[string][]string `json:"cloudant,omitempty"`
    32  
    33  	// Manage permissions using the `_users` database only. This field is only
    34  	// used or populated by IBM Cloudant. See the [Cloudant documentation] for
    35  	// details.
    36  	//
    37  	// [Cloudant documentation]: https://cloud.ibm.com/apidocs/cloudant#getsecurity
    38  	CouchdbAuthOnly *bool `json:"couchdb_auth_only,omitempty"`
    39  }
    40  

View as plain text