Home / File/ githubapi_test.go — gin Source File

githubapi_test.go — gin Source File

Architecture documentation for githubapi_test.go, a go file in the gin codebase. 1 imports, 0 dependents.

File go GinCore Middleware 1 imports 11 functions 2 classes

Entity Profile

Dependency Diagram

graph LR
  851931d7_59a3_9c02_f8d4_6771ae5af6e6["githubapi_test.go"]
  e8c9ceab_299a_1e0e_919f_ddb404deb199["fmt"]
  851931d7_59a3_9c02_f8d4_6771ae5af6e6 --> e8c9ceab_299a_1e0e_919f_ddb404deb199
  style 851931d7_59a3_9c02_f8d4_6771ae5af6e6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.

package gin

import (
	"fmt"
	"math/rand"
	"net/http"
	"net/http/httptest"
	"os"
	"strconv"
	"strings"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

type route struct {
	method string
	path   string
}

// http://developer.github.com/v3/
var githubAPI = []route{
	// OAuth Authorizations
	{http.MethodGet, "/authorizations"},
	{http.MethodGet, "/authorizations/:id"},
	{http.MethodPost, "/authorizations"},
	//{http.MethodPut, "/authorizations/clients/:client_id"},
	//{http.MethodPatch, "/authorizations/:id"},
	{http.MethodDelete, "/authorizations/:id"},
	{http.MethodGet, "/applications/:client_id/tokens/:access_token"},
	{http.MethodDelete, "/applications/:client_id/tokens"},
	{http.MethodDelete, "/applications/:client_id/tokens/:access_token"},

	// Activity
	{http.MethodGet, "/events"},
	{http.MethodGet, "/repos/:owner/:repo/events"},
	{http.MethodGet, "/networks/:owner/:repo/events"},
	{http.MethodGet, "/orgs/:org/events"},
	{http.MethodGet, "/users/:user/received_events"},
	{http.MethodGet, "/users/:user/received_events/public"},
	{http.MethodGet, "/users/:user/events"},
	{http.MethodGet, "/users/:user/events/public"},
	{http.MethodGet, "/users/:user/events/orgs/:org"},
	{http.MethodGet, "/feeds"},
	{http.MethodGet, "/notifications"},
	{http.MethodGet, "/repos/:owner/:repo/notifications"},
	{http.MethodPut, "/notifications"},
	{http.MethodPut, "/repos/:owner/:repo/notifications"},
	{http.MethodGet, "/notifications/threads/:id"},
	//{http.MethodPatch, "/notifications/threads/:id"},
	{http.MethodGet, "/notifications/threads/:id/subscription"},
	{http.MethodPut, "/notifications/threads/:id/subscription"},
	{http.MethodDelete, "/notifications/threads/:id/subscription"},
	{http.MethodGet, "/repos/:owner/:repo/stargazers"},
	{http.MethodGet, "/users/:user/starred"},
// ... (417 more lines)

Domain

Subdomains

Classes

Dependencies

  • fmt

Frequently Asked Questions

What does githubapi_test.go do?
githubapi_test.go is a source file in the gin codebase, written in go. It belongs to the GinCore domain, Middleware subdomain.
What functions are defined in githubapi_test.go?
githubapi_test.go defines 11 function(s): BenchmarkGithub, BenchmarkParallelGithub, BenchmarkParallelGithubDefault, TestBindUri, TestBindUriError, TestGithubAPI, TestRaceContextCopy, TestShouldBindUri, exampleFromPath, githubConfigRouter, and 1 more.
What does githubapi_test.go depend on?
githubapi_test.go imports 1 module(s): fmt.
Where is githubapi_test.go in the architecture?
githubapi_test.go is located at githubapi_test.go (domain: GinCore, subdomain: Middleware).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free