Skip to content

Instantly share code, notes, and snippets.

View ajatprabha's full-sized avatar

Ajat Prabha ajatprabha

View GitHub Profile
@ajatprabha
ajatprabha / manipulator.go
Created July 18, 2019 22:49
Darkroom Manipulator Interface
// ProcessSpec defines the specification for a image manipulation job
type ProcessSpec struct {
// Scope defines a scope for the image manipulation job, it can be used for logging/mertrics collection purposes
Scope string
// ImageData holds the actual image contents to processed
ImageData []byte
// Params hold the key-value pairs for the processing job and tells the manipulator what to do with the image
Params map[string]string
}
@ajatprabha
ajatprabha / storage.go
Last active July 18, 2019 22:50
Darkroom Storage Interface
// Storage interface sets the contract that the implementation has to fulfil.
type Storage interface {
// Get takes in the Context and path as an argument and returns an IResponse interface implementation.
// This method figures out how to get the data from the storage backend.
Get(ctx context.Context, path string) IResponse
}

Keybase proof

I hereby claim:

  • I am ajatprabha on github.
  • I am ajatprabha (https://keybase.io/ajatprabha) on keybase.
  • I have a public key ASD5MqfNjLB1joeA3GpDDIF_8V2zEPuCj99XNDXRE4pbJAo

To claim this, I am signing this object:

@ajatprabha
ajatprabha / membership.html
Last active March 12, 2018 18:22
Improved code for UserView under users/views.py
{% with systersuser.communities.all as communities and systersuser.created_by.unapproved as join_requests %}
{% if communities or join_requests %}
<!-- existing code as before -->
{% else %}
<p>Looks like you are member of no community.</p>
{% endif %}
{% endwith %}