//GetCouchDBDefinition exposes the useCouchDB variable
483786
func GetCouchDBDefinition() *CouchDBDef {

	couchDBAddress := viper.GetString("ledger.state.couchDBConfig.couchDBAddress")
	username := viper.GetString("ledger.state.couchDBConfig.username")
	password := viper.GetString("ledger.state.couchDBConfig.password")
	maxRetries := viper.GetInt("ledger.state.couchDBConfig.maxRetries")
	maxRetriesOnStartup := viper.GetInt("ledger.state.couchDBConfig.maxRetriesOnStartup")
	requestTimeout := viper.GetDuration("ledger.state.couchDBConfig.requestTimeout")
	createGlobalChangesDB := viper.GetBool("ledger.state.couchDBConfig.createGlobalChangesDB")

	return &CouchDBDef{couchDBAddress, username, password, maxRetries, maxRetriesOnStartup, requestTimeout, createGlobalChangesDB}
}
100619
func (s *SupportImpl) GetChaincodeDefinition(chaincodeName string, txsim ledger.QueryExecutor) (ccprovider.ChaincodeDefinition, error) {
	return s.ChaincodeSupport.Lifecycle.ChaincodeDefinition(chaincodeName, txsim)
}
1244921
func FromThriftToEntityDefinition(ed *dosarpc.EntityDefinition) *dosa.EntityDefinition {
	fields := make([]*dosa.ColumnDefinition, len(ed.FieldDescs))
	i := 0
	for k, v := range ed.FieldDescs {
		fields[i] = &dosa.ColumnDefinition{
			Name: k,
			Type: RPCTypeToClientType(*v.Type),
			// TODO Tag
		}
		i++
	}

	indexes := make(map[string]*dosa.IndexDefinition)
	for name, index := range ed.Indexes {
		indexes[name] = &dosa.IndexDefinition{
			Key: FromThriftToPrimaryKey(index.Key),
		}
	}

	etlState := dosa.EtlOff
	if ed.Etl != nil {
		etlState = fromThriftToETLState(ed.Etl)
	}

	return &dosa.EntityDefinition{
		Name:    *ed.Name,
		Columns: fields,
		Key:     FromThriftToPrimaryKey(ed.PrimaryKey),
		Indexes: indexes,
		ETL:     etlState,
	}
}
194870
func GetDefinitionVersionKind(s spec.Schema) (string, string, string) {
	// Get the reference for complex types
	if IsDefinition(s) {
		s := fmt.Sprintf("%s", s.SchemaProps.Ref.GetPointer())
		s = strings.Replace(s, "/definitions/", "", -1)
		name := strings.Split(s, ".")

		var group, version, kind string
		if name[len(name)-3] == "api" {
			// e.g. "io.k8s.apimachinery.pkg.api.resource.Quantity"
			group = "core"
			version = name[len(name)-2]
			kind = name[len(name)-1]
		} else if name[len(name)-4] == "api" {
			// e.g. "io.k8s.api.core.v1.Pod"
			group = name[len(name)-3]
			version = name[len(name)-2]
			kind = name[len(name)-1]
		} else if name[len(name)-4] == "apis" {
			// e.g. "io.k8s.apimachinery.pkg.apis.meta.v1.Status"
			group = name[len(name)-3]
			version = name[len(name)-2]
			kind = name[len(name)-1]
		} else if name[len(name)-3] == "util" || name[len(name)-3] == "pkg" {
			// e.g. io.k8s.apimachinery.pkg.util.intstr.IntOrString
			// e.g. io.k8s.apimachinery.pkg.runtime.RawExtension
			return "", "", ""
		} else {
			panic(errors.New(fmt.Sprintf("Could not locate group for %s", name)))
		}
		return group, version, kind
	}
	// Recurse if type is array
	if IsArray(s) {
		return GetDefinitionVersionKind(*s.Items.Schema)
	}
	return "", "", ""
}
330527
func (d *DeploymentStatus) GetDescription() string {
	if d == nil || d.Description == nil {
		return ""
	}
	return *d.Description
}
450170
func (s *StatusEvent) GetDescription() string {
	if s == nil || s.Description == nil {
		return ""
	}
	return *s.Description
}
516045
func docsDefinition() (*design.DocsDefinition, bool) {
	a, ok := dslengine.CurrentDefinition().(*design.DocsDefinition)
	if !ok {
		dslengine.IncompatibleDSL()
	}
	return a, ok
}
292010
func (provider *provider) GetDBHandle(ledgerID string, cat Category) *leveldbhelper.DBHandle {
	return provider.dbProvider.GetDBHandle(fmt.Sprintf(ledgerID+"/%d", cat))
}
279400
func mediaTypeDefinition() (*design.MediaTypeDefinition, bool) {
	m, ok := dslengine.CurrentDefinition().(*design.MediaTypeDefinition)
	if !ok {
		dslengine.IncompatibleDSL()
	}
	return m, ok
}
1134243
func (client *Client) GetSpaceQuotaDefinition(guid string) (SpaceQuota, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetSpaceQuotaDefinitionRequest,
		URIParams:   Params{"space_quota_guid": guid},
	})
	if err != nil {
		return SpaceQuota{}, nil, err
	}

	var spaceQuota SpaceQuota
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &spaceQuota,
	}

	err = client.connection.Make(request, &response)
	return spaceQuota, response.Warnings, err
}
255883
func (r Software_VirtualLicense) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
	err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getSoftwareDescription", nil, &r.Options, &resp)
	return
}
300995
func (obj *GenericDimension) GetDimension(ctx context.Context) (*NxLibraryDimensionDef, error) {
	result := &struct {
		Dim *NxLibraryDimensionDef	`json:"qDim"`
	} {}
	err := obj.rpc(ctx, "GetDimension", result)
	return result.Dim, err 
}
725202
func (e *EntityDefinition) FindColumnDefinition(name string) *ColumnDefinition {
	for _, cd := range e.Columns {
		if cd.Name == name {
			return cd
		}
	}
	return nil
}
109567
func (db *DB) GetContext(ctx context.Context, dest interface{}, keys ...interface{}) error {
	return getObject(ctx, db, db, dest, keys)
}
655333
func (t *Template) GetAllAWSECSTaskDefinitionResources() map[string]*resources.AWSECSTaskDefinition {
	results := map[string]*resources.AWSECSTaskDefinition{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSECSTaskDefinition:
			results[name] = resource
		}
	}
	return results
}
1244067
func getBlockTxTablesDefinition() types.EventTables {
	return types.EventTables{
		types.SQLBlockTableName: &types.SQLTable{
			Name: types.SQLBlockTableName,
			Columns: []*types.SQLTableColumn{
				{
					Name:    types.SQLColumnLabelHeight,
					Type:    types.SQLColumnTypeVarchar,
					Length:  100,
					Primary: true,
				},
				{
					Name:    types.SQLColumnLabelBlockHeader,
					Type:    types.SQLColumnTypeJSON,
					Primary: false,
				},
			},
		},

		types.SQLTxTableName: &types.SQLTable{
			Name: types.SQLTxTableName,
			Columns: []*types.SQLTableColumn{
				// transaction table
				{
					Name:    types.SQLColumnLabelHeight,
					Type:    types.SQLColumnTypeVarchar,
					Length:  100,
					Primary: true,
				},
				{
					Name:    types.SQLColumnLabelTxHash,
					Type:    types.SQLColumnTypeVarchar,
					Length:  txs.HashLengthHex,
					Primary: true,
				},
				{
					Name:    types.SQLColumnLabelIndex,
					Type:    types.SQLColumnTypeNumeric,
					Length:  0,
					Primary: false,
				},
				{
					Name:    types.SQLColumnLabelTxType,
					Type:    types.SQLColumnTypeVarchar,
					Length:  100,
					Primary: false,
				},
				{
					Name:    types.SQLColumnLabelEnvelope,
					Type:    types.SQLColumnTypeJSON,
					Primary: false,
				},
				{
					Name:    types.SQLColumnLabelEvents,
					Type:    types.SQLColumnTypeJSON,
					Primary: false,
				},
				{
					Name:    types.SQLColumnLabelResult,
					Type:    types.SQLColumnTypeJSON,
					Primary: false,
				},
				{
					Name:    types.SQLColumnLabelReceipt,
					Type:    types.SQLColumnTypeJSON,
					Primary: false,
				},
				{
					Name:    types.SQLColumnLabelException,
					Type:    types.SQLColumnTypeJSON,
					Primary: false,
				},
			},
		},
	}
}
934195
func (provider *HistoryDBProvider) GetDBHandle(dbName string) (historydb.HistoryDB, error) {
	return newHistoryDB(provider.dbProvider.GetDBHandle(dbName), dbName), nil
}