Coder Social home page Coder Social logo

go-lib-ssv's Introduction

go-lib-ssv

The aim of this repository is simplify the chaos of the SSV

Verifiers added for

Quick look

import "github.com/hiyali/go-lib-ssv/admob"

func main() {
  admob.LogEnabled = true // enable log query raw, default is: false
  if err := admob.Verify(adRewardUrl); err != nil {
    // Verification failed
  }

  // Verified
}

admob server callback url look like:

https://www.yourdomain.com/path?ad_network=5450213213286189855&ad_unit=12345678&reward_amount=10&reward_item=coins×tamp=1507770365237823&transaction_id=1234567890ABCDEF1234567890ABCDEF&user_id=1234567&signature=MEUCIQDGx44BZgQU6TU4iYEo1nyzh3NgDEvqNAUXlax-XPBQ5AIgCXSdjgKZvs_6QNYad29NJRqwGIhGb7GfuI914MDDZ1c&key_id=1268222887

Lib / Method

All libs have LogEnabled property

lib.Method Description
admob.Verify(url *url.Url) error
mopub.Verify(url *url.Url, secret, verifierKey string) error verifierKey usually is hash, you'll find secret key in Rewarded video tab in https://app.mopub.com/account page

Examples

import "github.com/hiyali/go-lib-ssv/admob"

func ApiGetHandler(c echo.Context) (err error) {
  ...
  if err := admob.Verify(c.Request().URL); err != nil {
    log.Errorf("Verification failed - err: %v", err)
    return err
  }

  // do something after verified
  ...
}

Contribution

Feel free

go-lib-ssv's People

Contributors

hiyali avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.