Giter VIP home page Giter VIP logo

go-clearkey-server's Introduction

DRM ClearKey Server

Go

The idea behind this little project is to have a working ClearKey server for test purposes. This was the idea behind the real first version, but I ended up with a new version of this project written with hexagonal architecture in mind. If you don't know what ClearKey systems are, I let you check what is a DRM first, then look for this kind of system. Of course, this server is completely compliant with W3C specification.

As this is my first application in Go & with this kind of architecture, it is obvious that it is not production ready.

Usage

go run .

If you are willing to use PostgreSQL as repository, you have a docker-compose.yml file available which have credentials that are the same as environment variable's default.

Video player

In order to try it, you can also run index.html, which contains a simple video player to run against your go-clearkey-server, please note that you need to update key ids accordingly.

Environment variables

Variable name Viper KeyID Default Description
ENV EnvType development Either development or production, if development the logs are sugared, else it is JSON
PORT Port 8080 Listening port of the application
IP Ip 0.0.0.0 Listening IP address of the application
ALLOWED_DOMAINS Domains []string{"http://localhost:*", "http://127.0.0.1:*"} CORS allowed domains
REPOSITORY_TYPE Repository RAM Define the type of repository used, choose between RAM and PSQL
PSQL_PASSWORD Psql_pass PostgreSQL password
PSQL_USER Psql_user PostgreSQL username
PSQL_ADDR Psql_addr 127.0.0.0:5433 PostgreSQL address (default is docker-compose.yml port)
PSQL_DB Psql_db postgres PostgreSQL database
PSQL_INSECURE Psql_insecure true Define whether postgres tries to connect using TLS handshake

Routes

Method Route Description
GET /license Fetch all license and shows them, you should not have an endpoint like this in production.
POST /license Request a license value following W3C specs
POST /license/register Request to register a new license, no body expected, but it will generate a key that will be returned as license format

go-clearkey-server's People

Contributors

alexandrebrg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

go-clearkey-server's Issues

How to start the project?

The webpage is not showing up. Docker starts okay and looks fine but once opened up in the browser no webpage. i exposed port 8080 in docker but no luck getting it to work.

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.