---
title: Device
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/device/struct.Device/
---

**Kind:** Struct  
**Module:** [device](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/device/)  
**Package:** compute-sdk-go v1.11.0  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L21

```go
type Device struct {
	// contains filtered or unexported fields
}
```

## Methods

### Brand

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L85

```go
func (d *Device) Brand() string
```

Brand returns the brand of the client device, possibly different from
the manufacturer of that device.

**Returns**

`string`

### HWType

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L100

```go
func (d *Device) HWType() string
```

HWType returns a string representation of the primary client platform
hardware.  The most commonly used device types are also identified
via boolean variables.  Because a device may have multiple device
types and this variable only has the primary type, we recommend using
the boolean variables for logic and using this string representation
for logging.

**Returns**

`string`

### Identified

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L197

```go
func (d *Device) Identified() bool
```

UserAgentIdentified returns true if the client device was successfully identified

**Returns**

`bool`

### IsDesktop

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L146

```go
func (d *Device) IsDesktop() bool
```

IsDesktop returns true if the client device is a desktop web browser.

**Returns**

`bool`

### IsDownloader

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L187

```go
func (d *Device) IsDownloader() bool
```

UserAgentIsDownloader returns true if the client device is a downloader

**Returns**

`bool`

### IsEReader

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L106

```go
func (d *Device) IsEReader() bool
```

IsEReader returns true if the client device is a reading device (like
a Kindle).

**Returns**

`bool`

### IsFeedreader

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L192

```go
func (d *Device) IsFeedreader() bool
```

UserAgentIsFeedreader returns true if the client device is a feed reader

**Returns**

`bool`

### IsGameConsole

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L112

```go
func (d *Device) IsGameConsole() bool
```

IsGameConsole returns true if the client device is a video game
console (like a PlayStation or Xbox).

**Returns**

`bool`

### IsMediaPlayer

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L119

```go
func (d *Device) IsMediaPlayer() bool
```

IsMediaPlayer returns true if the client device is a media player
(like Blu-ray players, iPod devices, and smart speakers such as
Amazon Echo).

**Returns**

`bool`

### IsMobile

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L124

```go
func (d *Device) IsMobile() bool
```

IsMobile returns true if the client device is a mobile phone.

**Returns**

`bool`

### IsSmartTV

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L129

```go
func (d *Device) IsSmartTV() bool
```

IsSmartTV returns true if the client device is a smart TV.

**Returns**

`bool`

### IsTablet

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L135

```go
func (d *Device) IsTablet() bool
```

IsTablet returns true if the client device is a tablet (like an
iPad).

**Returns**

`bool`

### IsTouchscreen

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L152

```go
func (d *Device) IsTouchscreen() bool
```

IsTouchscreen returns true if the client device's screen is touch
sensitive.

**Returns**

`bool`

### IsTVPlayer

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L141

```go
func (d *Device) IsTVPlayer() bool
```

IsTVPlayer returns true if the client device is a set-top box or
other TV player (like a Roku or Apple TV).

**Returns**

`bool`

### Model

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L90

```go
func (d *Device) Model() string
```

Model returns the model of the client device.

**Returns**

`string`

### Name

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L79

```go
func (d *Device) Name() string
```

Name returns the name of the client device.

**Returns**

`string`

### UserAgentBotName

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L177

```go
func (d *Device) UserAgentBotName() string
```

UserAgentBotName returns the bot name (if the user agent is a bot)

**Returns**

`string`

### UserAgentIsBot

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L182

```go
func (d *Device) UserAgentIsBot() bool
```

UserAgentIsBot returns true if the client device is a bot

**Returns**

`bool`

### UserAgentMajor

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L162

```go
func (d *Device) UserAgentMajor() string
```

UserAgentMajor returns the major version of the user agent

**Returns**

`string`

### UserAgentMinor

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L167

```go
func (d *Device) UserAgentMinor() string
```

UserAgentMinor returns the minor version of the user agent

**Returns**

`string`

### UserAgentName

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L157

```go
func (d *Device) UserAgentName() string
```

UserAgentName returns the name of the user agent

**Returns**

`string`

### UserAgentPatch

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/device/device_detection.go#L172

```go
func (d *Device) UserAgentPatch() string
```

UserAgentPatch returns the patch level version of the user agent

**Returns**

`string`
