Documentation
¶
Overview ¶
Package securedrm is the client of SecureDRM, Ulka Networks' hosted key service: it keeps each video's key and hands it only to players carrying a token this server signed. Without it (KEY_SERVICE=local) keys stay in the database.
Index ¶
- Variables
- type Client
- func (k *Client) Create(ctx context.Context, contentID string) (key, iv []byte, err error)
- func (k *Client) Delete(ctx context.Context, contentID string) error
- func (k *Client) Get(ctx context.Context, contentID string) (key, iv []byte, err error)
- func (k *Client) Ping(ctx context.Context) error
- func (k *Client) PlayerURL(contentID string, exp time.Time) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoKey = errors.New("key service has no key for this video") ErrKeyRefused = errors.New("key service refused the API key") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
URL string // e.g. https://b.securedrm.link
APIKey string
TokenKid string
TokenSecret []byte
Client *http.Client
}
Client is a core.KeyStore kept by SecureDRM.
func (*Client) Create ¶
Create returns the video's key, made on first call; asking again returns the same one.
Click to show internal directories.
Click to hide internal directories.