// Create an array of PostInterfaces based on the array of MiniPost objects provided
344307
func makePostsFromMinis(minis []MiniPost, client ClientInterface) []PostInterface {
	posts := []PostInterface{}
	for _, mini := range minis {
		post, _ := makePostFromType(mini.Type)
		post.GetSelf().client = client
		posts = append(posts, post)
	}
	return posts
}
2452
func GetDefaultInterfaces() (IfAddrs, error) {
	ri, err := NewRouteInfo()
	if err != nil {
		return nil, err
	}

	defaultIfName, err := ri.GetDefaultInterfaceName()
	if err != nil {
		return nil, err
	}

	var defaultIfs, ifAddrs IfAddrs
	ifAddrs, err = GetAllInterfaces()
	for _, ifAddr := range ifAddrs {
		if ifAddr.Name == defaultIfName {
			defaultIfs = append(defaultIfs, ifAddr)
		}
	}

	return defaultIfs, nil
}
151636
func init() {
	if intIs64 {
		arrayTypeMap[reflect.TypeOf(int(0))] = C.PN_LONG
		arrayTypeMap[reflect.TypeOf(uint(0))] = C.PN_ULONG
	} else {
		arrayTypeMap[reflect.TypeOf(int(0))] = C.PN_INT
		arrayTypeMap[reflect.TypeOf(uint(0))] = C.PN_UINT
	}
}
1201104
func GetInterfaces() (Interfaces, error) {
	interfaces, err := net.Interfaces()
	if err != nil {
		Logln("Can't get interfaces.", err)
		return nil, err
	}
	var ifaces Interfaces
	for _, iface := range interfaces {
		ifaces = append(ifaces, Interface(iface))
	}
	return ifaces, nil
}
1166021
func NewPushNodesByBackendIDsToFrontendArgs(backendNodeIDs []BackendNodeID) *PushNodesByBackendIDsToFrontendArgs {
	args := new(PushNodesByBackendIDsToFrontendArgs)
	args.BackendNodeIDs = backendNodeIDs
	return args
}
937510
func (user *User) Postlist(options PostlistOptions) *[]ExistingPost {
	users := User{}.TableName()
	var post UserPost

	query := Db().Model(UserPost{}).Order("hpid DESC").
		Joins("JOIN "+users+" ON "+users+".counter = "+post.TableName()+".to").
		Where(`"to" = ?`, user.ID())

	options.Model = post

	var userPosts []UserPost
	query = postlistQueryBuilder(query, options, user)
	query.Scan(&userPosts)

	var retPosts []ExistingPost
	for _, p := range userPosts {
		userPost := p
		retPosts = append(retPosts, ExistingPost(&userPost))
	}

	return &retPosts
}
740009
func (l *listenerManager) postInitPlugins(event apid.Event) {
	var plinfoDetails []pluginDetail
	if pie, ok := event.(apid.PluginsInitializedEvent); ok {
		/*
		 * Store the plugin details in the heap. Needed during
		 * Bearer token generation request.
		 */
		for _, plugin := range pie.Plugins {
			name := plugin.Name
			version := plugin.Version
			if schemaVersion, ok := plugin.ExtraData["schemaVersion"].(string); ok {
				inf := pluginDetail{
					Name:          name,
					SchemaVersion: schemaVersion}
				plinfoDetails = append(plinfoDetails, inf)
				log.Debugf("plugin %s is version %s, schemaVersion: %s", name, version, schemaVersion)
			}
		}
		if plinfoDetails == nil {
			log.Panic("No Plugins registered!")
		}

		pgInfo, err := json.Marshal(plinfoDetails)
		if err != nil {
			log.Panicf("Unable to marshal plugin data: %v", err)
		}
		apidPluginDetails = string(pgInfo[:])

		log.Debug("start post plugin init")

		l.tokenMan.start()
		go l.bootstrap(apidInfo.LastSnapshot)

		log.Debug("Done post plugin init")
	}
}
1095443
func (a *InternalAPIEngine) PostJSON(m MetaContext, arg APIArg) (*APIRes, error) {
	return a.Post(m, arg)
}
1101240
func parseImplementsInterfaces(parser *Parser) ([]*ast.Named, error) {
	types := []*ast.Named{}
	if parser.Token.Value == "implements" {
		if err := advance(parser); err != nil {
			return nil, err
		}
		// optional leading ampersand
		skip(parser, lexer.AMP)
		for {
			ttype, err := parseNamed(parser)
			if err != nil {
				return types, err
			}
			types = append(types, ttype)
			if skipped, err := skip(parser, lexer.AMP); !skipped {
				break
			} else if err != nil {
				return types, err
			}
		}
	}
	return types, nil
}
217977
func NewInterfaces(less func(x, y interface{}) bool, cap int) Interfaces {
	h := &interfaces{}

	h.less = func(i, j int) bool {
		return less(h.list[i], h.list[j])
	}
	if cap > 0 {
		h.list = make([]interface{}, 0, cap+1)
	}

	return h
}
365523
func ContainerChildrenPostQuery(
	ctx context.Context,
	client api.Client,
	containerPath string,
	limit, maxDepth int,
	query *ContainerQuery) ([]*ContainerChild, error) {

	var resp ContainerChildList

	if err := client.Post(
		ctx,
		realNamespacePath(client),
		containerPath,
		api.OrderedValues{
			{queryByteArr},
			{limitByteArr, []byte(fmt.Sprintf("%d", limit))},
			{maxDepthByteArr, []byte(fmt.Sprintf("%d", maxDepth))},
		},
		nil,
		query,
		&resp); err != nil {

		return nil, err
	}

	return resp, nil
}
770683
func (c *Connect) ListDefinedInterfaces() ([]string, error) {
	const maxIfaces = 1024
	var names [maxIfaces](*C.char)
	namesPtr := unsafe.Pointer(&names)
	var err C.virError
	numIfaces := C.virConnectListDefinedInterfacesWrapper(
		c.ptr,
		(**C.char)(namesPtr),
		maxIfaces, &err)
	if numIfaces == -1 {
		return nil, makeError(&err)
	}
	goNames := make([]string, numIfaces)
	for k := 0; k < int(numIfaces); k++ {
		goNames[k] = C.GoString(names[k])
		C.free(unsafe.Pointer(names[k]))
	}
	return goNames, nil
}
1236598
func IteratePostOrder(exp Expression, visitorFunction func(exp Expression) bool) {
	exp.Accept(&postOrderIterator{visitorFunction})
}
750419
func (o *Me) VMInterfaces(info *bambou.FetchingInfo) (VMInterfacesList, *bambou.Error) {

	var list VMInterfacesList
	err := bambou.CurrentSession().FetchChildren(o, VMInterfaceIdentity, &list, info)
	return list, err
}
523942
func (address *Address) SetInterfaces(interfaces Interfaces) *Address {
	address.interfaces = interfaces
	return address
}
73122
func CreatePost(client ClientInterface, name string, params url.Values) (*PostRef, error) {
	return doPost(client, "/blog/%s/post", name, params)
}
683479
func (o *Domain) ContainerInterfaces(info *bambou.FetchingInfo) (ContainerInterfacesList, *bambou.Error) {

	var list ContainerInterfacesList
	err := bambou.CurrentSession().FetchChildren(o, ContainerInterfaceIdentity, &list, info)
	return list, err
}