// BoardInfo returns a *BoardInfo struct
772407
func (user *User) BoardInfo() *BoardInfo {
	defaultTemplate := Template{
		Name:   Configuration.Templates[user.Profile.Template],
		Number: user.Profile.Template}

	mobileTemplate := Template{
		Name:   Configuration.Templates[user.Profile.MobileTemplate],
		Number: user.Profile.MobileTemplate}

	return &BoardInfo{
		Language:       user.BoardLang,
		Template:       &defaultTemplate,
		MobileTemplate: &mobileTemplate,
		Dateformat:     user.Profile.Dateformat,
		IsClosed:       user.Profile.Closed,
		Private:        user.Private,
		Whitelist:      user.Whitelist()}
}
219657
func (r *Report) Info(line int, message string) {
	r.entries = append(r.entries, Entry{entryInfo, message, line})
}
49189
func BusInfo(intf string) (string, error) {
	e, err := NewEthtool()
	if err != nil {
		return "", err
	}
	defer e.Close()
	return e.BusInfo(intf)
}
101355
func (c *Container) info() containerInfo {
	info := containerInfo{N: c.n}

	if c.isArray() {
		info.Type = "array"
		info.Alloc = len(c.array()) * 2 // sizeof(uint16)
	} else if c.isRun() {
		info.Type = "run"
		info.Alloc = len(c.runs())*interval16Size + runCountHeaderSize
	} else {
		info.Type = "bitmap"
		info.Alloc = len(c.bitmap()) * 8 // sizeof(uint64)
	}

	if c.mapped {
		if c.isArray() {
			info.Pointer = unsafe.Pointer(&c.array()[0])
		} else if c.isRun() {
			info.Pointer = unsafe.Pointer(&c.runs()[0])
		} else {
			info.Pointer = unsafe.Pointer(&c.bitmap()[0])
		}
	}

	return info
}
864929
func (client *peerRESTClient) ServerInfo() (info ServerInfoData, err error) {
	respBody, err := client.call(peerRESTMethodServerInfo, nil, nil, -1)
	if err != nil {
		return
	}
	defer http.DrainBody(respBody)
	err = gob.NewDecoder(respBody).Decode(&info)
	return info, err
}
1352580
func (api *CrossControllerAPI) ControllerInfo() (params.ControllerAPIInfoResults, error) {
	results := params.ControllerAPIInfoResults{
		Results: make([]params.ControllerAPIInfoResult, 1),
	}
	addrs, caCert, err := api.localControllerInfo()
	if err != nil {
		results.Results[0].Error = common.ServerError(err)
		return results, nil
	}
	results.Results[0].Addresses = addrs
	results.Results[0].CACert = caCert
	return results, nil
}
987761
func (a *azureObjects) StorageInfo(ctx context.Context) (si minio.StorageInfo) {
	return si
}
1316095
func InterfaceInfoFromDevices(nics map[string]device) ([]network.InterfaceInfo, error) {
	interfaces := make([]network.InterfaceInfo, len(nics))
	var i int
	for name, device := range nics {
		iInfo := network.InterfaceInfo{
			InterfaceName:       name,
			ParentInterfaceName: device["parent"],
			MACAddress:          device["hwaddr"],
			ConfigType:          network.ConfigDHCP,
		}
		if device["mtu"] != "" {
			mtu, err := strconv.Atoi(device["mtu"])
			if err != nil {
				return nil, errors.Annotate(err, "parsing device MTU")
			}
			iInfo.MTU = mtu
		}

		interfaces[i] = iInfo
		i++
	}

	sortInterfacesByName(interfaces)
	return interfaces, nil
}
577660
func (d *RaspberryPiDTDriver) BoardRevision() pinoutRevision {
	revision := CpuInfo(0, "Revision")
	switch revision {
	case "0002", "0003":
		return type0ne
	case "0010":
		return typeAplusBPlusZeroPi2
	}

	// Pi 2 boards have different strings, but pinout is the same as B+
	revision = CpuInfo(0, "CPU revision")
	switch revision {
	case "5":
		return typeAplusBPlusZeroPi2
	case "7": //PI zero +
		return typeAplusBPlusZeroPi2
	}

	return typeTwo
}
744300
func (db *AgendaDB) AgendaInfo(agendaID string) (*AgendaTagged, error) {
	if db == nil || db.sdb == nil {
		return nil, errDefault
	}

	agenda, err := db.loadAgenda(agendaID)
	if err != nil {
		return nil, err
	}

	return agenda, nil
}
1242588
func (s *Server) ImageFsInfo(ctx context.Context, req *pb.ImageFsInfoRequest) (resp *pb.ImageFsInfoResponse, err error) {
	const operation = "image_fs_info"
	defer func() {
		recordOperation(operation, time.Now())
		recordError(operation, err)
	}()

	store := s.StorageImageServer().GetStore()
	fsUsage, err := getStorageFsInfo(store)

	if err != nil {
		return nil, err
	}

	return &pb.ImageFsInfoResponse{
		ImageFilesystems: []*pb.FilesystemUsage{fsUsage},
	}, nil
}
1306243
func (s *ServerRPC) PodInfo(c context.Context, req *types.PodInfoRequest) (*types.PodInfoResponse, error) {
	info, err := s.daemon.GetPodInfo(req.PodID)
	if err != nil {
		return nil, err
	}

	return &types.PodInfoResponse{
		PodInfo: info,
	}, nil
}
1141500
func (a *MandrillAPI) TagInfo(tag string) (TagInfo, error) {
	var response TagInfo
	if tag == "" {
		return response, errors.New("tag cannot be blank")
	}

	var params map[string]interface{} = make(map[string]interface{})
	params["tag"] = tag
	err := parseMandrillJson(a, tags_info_endpoint, params, &response)
	return response, err
}
164365
func (engine *Engine) TableInfo(bean interface{}) *Table {
	v := rValue(bean)
	return &Table{engine.autoMapType(v), engine.tbName(v)}
}
736428
func (s *Stack) NICInfo() map[tcpip.NICID]NICInfo {
	s.mu.RLock()
	defer s.mu.RUnlock()

	nics := make(map[tcpip.NICID]NICInfo)
	for id, nic := range s.nics {
		flags := NICStateFlags{
			Up:          true, // Netstack interfaces are always up.
			Running:     nic.linkEP.IsAttached(),
			Promiscuous: nic.isPromiscuousMode(),
			Loopback:    nic.linkEP.Capabilities()&CapabilityLoopback != 0,
		}
		nics[id] = NICInfo{
			Name:              nic.name,
			LinkAddress:       nic.linkEP.LinkAddress(),
			ProtocolAddresses: nic.Addresses(),
			Flags:             flags,
			MTU:               nic.linkEP.MTU(),
			Stats:             nic.stats,
		}
	}
	return nics
}
813809
func (pfd *PiFaceDigital) InitBoard() error {

	err := pfd.mcp.Open()
	if err != nil {
		return err
	}

	var ioconfig byte
	ioconfig = (MCP23S17.BANK_OFF |
		MCP23S17.INT_MIRROR_OFF |
		MCP23S17.SEQOP_OFF |
		MCP23S17.DISSLW_OFF |
		MCP23S17.HAEN_ON |
		MCP23S17.ODR_OFF |
		MCP23S17.INTPOL_LOW)

	pfd.mcp.IOCON.SetValue(ioconfig)
	if pfd.mcp.IOCON.Value() != ioconfig {
		return fmt.Errorf("No PiFace Digital board detected (hardware_addr=%d, bus=%b, chip_select=%b).", pfd.mcp.HardwareAddress, pfd.mcp.Device.Bus, pfd.mcp.Device.Chip)
	}

	pfd.mcp.GPIOa.SetValue(0)
	pfd.mcp.IODIRa.SetValue(0)    // GPIOA as outputs
	pfd.mcp.IODIRb.SetValue(0xFF) // GPIOB as inputs
	pfd.mcp.GPPUb.SetValue(0xFF)  // input pullups on
	// pfd.EnableInterrupts()

	return nil
}
128253
func (srv *Server) PeersInfo() []*PeerInfo {
	// Gather all the generic and sub-protocol specific infos
	infos := make([]*PeerInfo, 0, srv.PeerCount())
	for _, peer := range srv.Peers() {
		if peer != nil {
			infos = append(infos, peer.Info())
		}
	}
	// Sort the result array alphabetically by node identifier
	for i := 0; i < len(infos); i++ {
		for j := i + 1; j < len(infos); j++ {
			if infos[i].ID > infos[j].ID {
				infos[i], infos[j] = infos[j], infos[i]
			}
		}
	}
	return infos
}