code_corps v0.0.1 API Reference
Modules
Testing stub for Cloudex,
Main entry-point for managing accounts
Changesets for Code Corps accounts
Module used to transform maps for the purposes of various adapters used by the application
Holds helpers to query CodeCorps.GithubEvent records using a map of params
In-memory interface to simulate calling out to the Segment API
Interface to the Segment API through the analytics-elixir package
Extract data for use in Segment tracking
Used for building friendly event names for use in Segment tracking
Segment tracking
Performs tracking of segment events
Used to determine what Segment should and should not track
Builds Segment traits from provided data
In-memory interface to simulate calling out to the Segment API, sending back itself a message with passed parameters - they’re used for assertions
Represents one of the user’s many possible authentication tokens, created
using Phoenix.Token.sign/4
Represents a category on Code Corps, e.g. “Society” and “Technology”
In charge of performing CRUD operations on Comment records, as well as any
additional actions that need to be performed when such an operation happens
A header of a CodeCorps.Message thread, depicting a start of a conversation
with a specific CodeCorps.User
An individual “line of conversation” in a CodeCorps.Conversation thread,
depicting a reply to the CodeCorps.Conversation by any of the two sides
This module defines the test case to be used by tests that require working with the database
Represents one of many donation goals which can belong to a project
Functions for working with comments on GitHub
The gate through which all communication with the GitHub API must go through
Functions for performing installation actions on the GitHub API
Functions for working with issues on GitHub
In charge of loading a a GitHub app .pem and generating a JSON Web Token from it
Used to parse and build pagination data when fetching multiple pages from the GitHub API
Functions for working with pull requests on GitHub
Functions for retrieving a GitHub repository’s issues, pull requests, and comments from the GitHub API
Used to perform user actions on the github API
Represents a client error from the GitHub API
Represents an error object from the GitHub API
Module used to convert GitHub payloads into attributes for a
GithubAppInstallation
Used to convert between GitHub data which represents a GitHub Issue Comment
and CodeCorps.Comment as well as CodeCorps.GithubComment attributes
Used to adapt a GitHub Issue payload into attributes for creating or updating
a CodeCorps.GithubIssue and vice-versa
Used to adapt a GitHub issue payload into attributes for creating or updating
a CodeCorps.Task
Decorates and undecorates the body of GitHub issues and comments as needed
In charge of marking GithubEvent records as “processing”, “processed” or
“errored”, based on the outcome of processing a webhook event payload
Default behavior for all GitHub webhook event handlers
In charge of handling a GitHub Webhook payload for the Installation event type https://developer.github.com/v3/activity/events/types/#installationevent
In charge of validatng a GitHub.API.Installation webhook payload
In charge of handling a GitHub Webhook payload for the InstallationRepositories event type
In charge of validatng a GitHub.API.InstallationRepositories webhook payload
In charge of handling a GitHub Webhook payload for the IssueComment event type
In charge of validatng a GitHub IssueComment webhook payload
In charge of handling a GitHub Webhook payload for the Issues event type
In charge of validatng a GitHub Issue webhook payload
In charge of handling a GitHub Webhook payload for the PullRequest event type
In charge of validatng a GitHub PullRequest webhook payload
Default behavior for all GitHub webhook event payload validators
A basic GitHub API mock which returns a 401 forbidden for all requests
A mocked github API layer which returns a default successful response for all GitHub API requests
GitHub syncing functions for
In charge of syncing CodeCorps.Comment records with a GitHub comment
payload
In charge of building a Changeset to update a Comment with, when handling
a GitHub Comment payload
In charge of managing changesets when creating or updating a
GithubAppInstallation in the process of handling an Installation event
In charge of finding a CodeCorps.GithubComment to link with a
CodeCorps.Comment when processing a GitHub Comment payload
In charge of finding or creating a CodeCorps.GithubIssue to link with a
CodeCorps.Task when processing a GitHub Issue payload
In charge of finding a pull request to link with a GithubPullRequest record
when processing a GitHub Pull Request payload
In charge of extracting ids from markdown content, paired to a predefined list of keywords
In charge of syncing to a GithubUser record given a GitHub API payload
containing the user
In charge of changesets for actions on CodeCorps.GithubUser records
In charge of building a Changeset to update a Task with, when handling an
Issues webhook
In charge of finding or creating a User given a GithubUser
In charge of finding a user to link with a given record given a GitHub API payload containing the user
Used to retrieve locally stored github records, using data contained in GitHub API payloads
Used for aggregating a list of results
Determines event support for a GitHub event type
Receives and handles GitHub event payloads
Represents an installation of the CodeCorps app to a user or an organization on GitHub
Provides some helpers for assembling and validating URLs
Contains helpers used to build a Json API structured payload from a flat attributes map
A message sent from a project to a user or from a user to a project
Main context for work with the Messaging feature
An individual part of a conversation in a CodeCorps.Conversation thread,
i.e. a reply to the CodeCorps.Conversation by any participant
Holds helpers to query CodeCorps.Conversation records using a map of params
Subcontext aimed at managing CodeCorps.Conversation records aimed at a
specific user belonging to a CodeCorps.Message
Handles email notifications used within the Messages context
A temporary module to be used by existing Model modules, before we switch to an intent based structure which Phoenix 1.3 pushes
This module defines the test case to be used by model tests
Represents an organization on Code Corps, e.g. “Code Corps” itself
Handles inviting organizations via email
Handles authorization for various API actions performed on objects in the database
Authorization policies for performing actions on Comment records
Handles CodeCorps.User authorization of actions on CodeCorps.Conversation
records
Handles CodeCorps.User authorization of actions on CodeCorps.Conversation
records
Handles User authorization of actions on GithubAppInstallation records
Handles User authorization of actions on GithubRepo records
Holds helpers for extracting record relationships and determining roles for authorization policies
Handles User authorization of actions on Message records
Authorization policies for performing actions on Organization records
Handles User authorization of actions on OrganizationGithubAppInstallation records
Handles User authorization of actions on ProjectUser records
Authorization policy in charge of determining if a User is authorized to
perform an action on a Task
Represents an authorization policy for performing actions on TaskSkill records. Used to authorize a controller action
Contains authorization policies for performing actions on a User record
Represents an authorization policy for performing actions on UserTask records. Used to authorize a controller action
This module defines the test case to be used by policy tests
Represents an category on Code Corps, e.g. “Society” and “Technology”
Represents a project on Code Corps, e.g. the “Code Corps” project itself
Contains queries for retrieving projects
Represents a category of a project
Represents a membership of a user in a project
Work with CodeCorps.Projects
This module defines a “role” on Code Corps
Handles CRUD operations for donation goals
Used to render provided markdown into html using an external renderer package
Handles special CRUD operations for CodeCorps.Project
Handles CRUD operations for users
Work with skills
A slugged route is used for routing slugged requests like /joshsmith or
/code-corps to their respective owner: either a user or an organization
This module defines the test case to be used by tests involving the stripe service
Represents a StripeConnectAccount stored on Code Corps
Represents a Plan object created using the Stripe API
Represents a Subscription object created using the Stripe API
Represents a reference to single Stripe API Event object
Represents a StripeInvoice stored on CodeCorps
Used for conversion between stripe api payload maps and maps
usable for creation of StripeConnectPlan records locally
Used for conversion between stripe api payload maps and maps usable for creation of StripeConnectSubscription records locally
Handles data transformations between the API Stripe.Event struct and maps of
attributes suitable for work with our own StripeEvent database objects
Used for conversion between stripe api payload maps and maps
usable for creation of StripeFileUpload records locally
Performs everything required to handle a charge.succeeded webhook on Stripe Connect
Used to perform actions on a StripeConnectExternalAccount record while
propagating to and from the associated Stripe.BankAccount record
Used to perform actions on StripeConnectPlan records
while at the same time propagating to and from associated Stripe.Plan
records
Used to perform actions on StripeConnectSubscription records while propagating
to and from associated Stripe.Subscription records
Used to perform actions on StripePlatformCard records, while propagating to and from associated Stripe.Card records
Used to perform actions on StripePlatformCustomer records while propagating
to and from associated Stripe.Customer records
Ensures a CodeCorps.Project is able to receive subscriptions
Ensures a CodeCorps.Project is able to receive subscriptions
Ensures a CodeCorps.User is able to subscribe to a CodeCorps.Project
Handler for Stripe Connect webhooks
Used to filter events based on environment
Handler for Stripe Platform webhooks
Used to process a Stripe webhook request
Used to load JSON fitures which simulate Stripe API responses into stripity_stripe structs
Represents a link record between a task and a skill, indicating that for a user to be suitable to work on a task, they need to posses skills associated with that task
Handles special CRUD operations for CodeCorps.Task
Holds queries used to retrieve a list of, or a single Task record from the
database, using a provided map of parameters/filters
This module defines a user of the Code Corps app
Represents a link record between a task and a user, indicating that the task was assigned to the user
Used for validating slug fields in a given changeset
Used for validating timestamp fields in a given changeset
Confirms URLs for the web client app routes
A module that keeps using definitions for controllers, views and so on
This module defines the test case to be used by tests that require setting up a connection, specificaly, those working with the API endpoints
This module defines the test case to be used by channel tests
This module defines the test case to be used by tests that require setting up a connection
Conveniences for translating and building error messages
A module providing Internationalization with a gettext-based API
Plug used to identify the current user on Segment.com using CodeCorps.Analytics.Segment
Puts authenticated Guardian user into conn.assigns[:current_user]
Converts params in the JSON api format into flat params convient for changeset casting
Converts id values in a conn parameters map into integers, if applicable
Used for reporting segment events
Captures user context
Module with named helpers generated from CodeCorpsWeb.Router
This module defines the test case to be used by tests for views defined in the application