All Projects → mxmCherry → Openrtb

mxmCherry / Openrtb

Licence: unlicense
Go (Golang) OpenRTB 2.5, 3.0 / AdCOM 1.0 / Native 1.2 types/enums

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Openrtb

Auth0 React Native Sample
Auth0 Integration Samples for React Native
Stars: ✭ 77 (-37.4%)
Mutual labels:  native
Cipher.so
A simple way to encrypt your secure data like passwords into a native .so library.
Stars: ✭ 1,308 (+963.41%)
Mutual labels:  native
Home Assistant Android
UNOFFICIAL Android app/frontend for Home Assistant (https://home-assistant.io)
Stars: ✭ 108 (-12.2%)
Mutual labels:  native
Arcgis Appstudio Samples
Collection of samples available in AppStudio for ArcGIS desktop to learn and help build your next app.
Stars: ✭ 78 (-36.59%)
Mutual labels:  native
Android Luajit Launcher
Android NativeActivity based launcher for LuaJIT, implementing the main loop within Lua land via FFI
Stars: ✭ 87 (-29.27%)
Mutual labels:  native
Ti.worker
Use Multi-Threading / Worker Threads in Appcelerator Titanium.
Stars: ✭ 95 (-22.76%)
Mutual labels:  native
Kitchensink V2
An Alloy-based Titanium sample app using ES6+ and more!
Stars: ✭ 73 (-40.65%)
Mutual labels:  native
Kotlinnativesample
Kotlin Native app working on Android & iPhone
Stars: ✭ 119 (-3.25%)
Mutual labels:  native
Iamport React Native
React Native용 아임포트 일반.결제 및 휴대폰 본인인증 모듈입니다.
Stars: ✭ 88 (-28.46%)
Mutual labels:  native
React Native Create Library
📓 Command line tool to create a React Native library with a single command
Stars: ✭ 1,362 (+1007.32%)
Mutual labels:  native
Hyperloop Examples
Native Hyperloop examples in Titanium.
Stars: ✭ 79 (-35.77%)
Mutual labels:  native
React Native Circle Button
A Customizable React Native Circle Button
Stars: ✭ 87 (-29.27%)
Mutual labels:  native
Pdf Php
Official R&OS PHP Pdf repository
Stars: ✭ 97 (-21.14%)
Mutual labels:  native
Delta
Programming language focused on performance and productivity
Stars: ✭ 77 (-37.4%)
Mutual labels:  native
Bacardi
Bacardi project is an effort to provide multi-language binding for Node.js native layer.
Stars: ✭ 115 (-6.5%)
Mutual labels:  native
Multiplatform Preferences
Kotlin Multi Platform Preferences, for android an ios : SharedPreferences & NSUserDefault
Stars: ✭ 76 (-38.21%)
Mutual labels:  native
Facebook ssl pinning
Bypassing SSL Pinning in Facebook Android App
Stars: ✭ 95 (-22.76%)
Mutual labels:  native
Lambda Lantern
🧙 ‎‎ A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.
Stars: ✭ 122 (-0.81%)
Mutual labels:  native
Spring Native
Spring Native provides beta support for compiling Spring applications to native executables using GraalVM native-image compiler.
Stars: ✭ 2,282 (+1755.28%)
Mutual labels:  native
React Native Navigation Drawer Extension
Drawer API built on top of wix react-native-navigation for iOS and Android (with TypeScript!)
Stars: ✭ 98 (-20.33%)
Mutual labels:  native

openrtb GoDoc Build Status

OpenRTB, AdCOM and OpenRTB Dynamic Native Ads types for Go programming language

Requires Go 1.8+

Go 1.8+ is needed for proper Ext json.RawMessage marshaling: non-pointer json.RawMessage is marshaled as base64 string prior to Go 1.8.

This library uses json.RawMessage since v10.0.0.

This library is tested with Go 1.9+ since v12.0.0.

Using

go get -u "github.com/mxmCherry/openrtb/v14/..."
import (
	openrtb2 "github.com/mxmCherry/openrtb/v14/openrtb2"

	openrtb3 "github.com/mxmCherry/openrtb/v14/openrtb3"
	adcom1 "github.com/mxmCherry/openrtb/v14/adcom1"

	native1 "github.com/mxmCherry/openrtb/v14/native1"
	nreq "github.com/mxmCherry/openrtb/v14/native1/request"
	nres "github.com/mxmCherry/openrtb/v14/native1/response"
)

This repo follows semver - see releases. Master always contains latest code, so better use some package manager to vendor specific version.

Guidelines

Naming convention

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

Types

  • Key types should be chosen according to OpenRTB specification (attribute types)
  • Numeric types:
    • int8 - short enums (with values <= 127), boolean-like attributes (like BidRequest.test)
    • int64 - other integral types
    • float64 - coordinates, prices etc.
  • Enums:
    • all enums, described in section 5, must be typed with section name singularized (e.g., "5.2 Banner Ad Types" -> type BannerAdType int8)
    • all typed enums must have constants for each element, prefixed with type name (e.g., "5.2 Banner Ad Types - XHTML Text Ad (usually mobile)" -> const BannerAdTypeXHTMLTextAd BannerAdType = 1)
    • never use iota for enum constants
    • OpenRTB (2.x) section "5.1 Content Categories" should remain untyped and have no constants

Pointers/omitempty

Pointer Omitempty When to use Example
no no required in spec Audio.mimes
yes yes required in spec, but is a part of mutually-exclusive group Imp.{banner,video,audio,native}
no yes zero value ("", 0) is useless / has no meaning Device.ua
yes yes zero value ("", 0) or value absence (null) has special meaning Device.{dnt,lmt}

Using both pointer and omitempty is mostly just to save traffic / generate more "canonical" (strict) JSON.

Documentation (pkg.go.dev)

  • Godoc: documenting Go code
  • Each entity (type, struct key or constant) should be documented
  • Comments for entities should be copy-pasted "as-is" from OpenRTB specification (except section 5 - replace "table" with "list" there; ideally, each sentence must be on a new line)

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
  • EditorConfig (not required, but useful)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].