go-rtb

GoDoc

OpenRTB v2.3 types for Go programming language (golang)

Warning! This package is considered unstable, consider using glide for vendoring specific version (commit hash).

Guidelines

Naming convention

  • UpperCamelCase
  • Capitalized abbreviations (e.g., AT, COPPA, PMP etc.)
  • Capitalized ID keys

Types

  • Key types should be chosen according to OpenRTB v2.3 specification (attribute types)
  • Numeric types:
    • architecture-independent, e.g., int32 instead of int
    • signed integral types should be used only when absolutely needed (value may contain negative numbers), unsigned integral types are preferred
    • enumerations should be represented with minimal integral types, e.g., uint8 or int8 for enumerations with <= 256 variants
    • for floating-point attributes only float64 type should be used

Documentation

  • Godoc: documenting Go code
  • Each entity (type or struct key) should be documented
  • Comments for entities should be copy-pasted "as-is" from OpenRTB specification

Code organization

  • Each RTB type should be kept in its own file, named after type
  • File names are in underscore_case, e.g., type BidRequest should be declared in bid_request.go
  • go fmt your code
S
Description
Go (Golang) OpenRTB 2.x, 3.0 / AdCOM 1.0 / Native 1.2 types/enums
Readme 913 KiB
Languages
Go 100%