Rename project to "Hetty"

This commit is contained in:
David Stotijn 2020-09-22 18:33:02 +02:00
parent 7defc19d1a
commit a3c22b7f1f
12 changed files with 28 additions and 32 deletions

View file

@ -1,5 +1,5 @@
{ {
"name": "gurp-admin", "name": "hetty-admin",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {

View file

@ -136,10 +136,7 @@ export function Layout(props: { children: React.ReactNode }): JSX.Element {
<MenuIcon /> <MenuIcon />
</IconButton> </IconButton>
<Typography variant="h5" noWrap> <Typography variant="h5" noWrap>
<Box component="span" mr={1} display="inline-block"> Hetty
🥥
</Box>{" "}
Coco
</Typography> </Typography>
</Toolbar> </Toolbar>
</AppBar> </AppBar>

View file

@ -22,7 +22,7 @@ function App({ Component, pageProps }: AppProps): JSX.Element {
return ( return (
<React.Fragment> <React.Fragment>
<Head> <Head>
<title>gurp</title> <title>Hetty</title>
<meta <meta
name="viewport" name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width" content="minimum-scale=1, initial-scale=1, width=device-width"

View file

@ -3,7 +3,7 @@ import RequestList from "../components/reqlog/RequestList";
function Index(): JSX.Element { function Index(): JSX.Element {
return ( return (
<div> <div>
<h1>gurp</h1> <h1>Hetty</h1>
</div> </div>
); );
} }

View file

@ -12,9 +12,9 @@ import (
"os" "os"
"strings" "strings"
"github.com/dstotijn/gurp/pkg/api" "github.com/dstotijn/hetty/pkg/api"
"github.com/dstotijn/gurp/pkg/proxy" "github.com/dstotijn/hetty/pkg/proxy"
"github.com/dstotijn/gurp/pkg/reqlog" "github.com/dstotijn/hetty/pkg/reqlog"
"github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/handler"
"github.com/99designs/gqlgen/graphql/playground" "github.com/99designs/gqlgen/graphql/playground"
@ -71,7 +71,7 @@ func main() {
adminRouter := router.MatcherFunc(func(req *http.Request, match *mux.RouteMatch) bool { adminRouter := router.MatcherFunc(func(req *http.Request, match *mux.RouteMatch) bool {
hostname, _ := os.Hostname() hostname, _ := os.Hostname()
host, _, _ := net.SplitHostPort(req.Host) host, _, _ := net.SplitHostPort(req.Host)
return strings.EqualFold(host, hostname) || (req.Host == "gurp.proxy" || req.Host == "localhost:8080") return strings.EqualFold(host, hostname) || (req.Host == "hetty.proxy" || req.Host == "localhost:8080")
}).Subrouter() }).Subrouter()
// GraphQL server. // GraphQL server.

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/dstotijn/gurp module github.com/dstotijn/hetty
go 1.13 go 1.13

View file

@ -29,14 +29,13 @@ resolver:
# Optional: turn on to use []Thing instead of []*Thing # Optional: turn on to use []Thing instead of []*Thing
omit_slice_element_pointers: true omit_slice_element_pointers: true
# Optional: set to speed up generation time by not performing a final validation pass. # Optional: set to speed up generation time by not performing a final validation pass.
# skip_validation: true # skip_validation: true
# gqlgen will search for any type names in the schema in these go packages # gqlgen will search for any type names in the schema in these go packages
# if they match it will use them, otherwise it will generate them. # if they match it will use them, otherwise it will generate them.
# autobind: # autobind:
# - "github.com/dstotijn/gurp/graph/model" # - "github.com/dstotijn/hetty/graph/model"
# This section declares type mapping between the GraphQL and go type systems # This section declares type mapping between the GraphQL and go type systems
# #

View file

@ -1,5 +1,5 @@
@cert = $HOME/.ssh/gurp_cert.pem @cert = $HOME/.ssh/hetty_cert.pem
@key = $HOME/.ssh/gurp_key.pem @key = $HOME/.ssh/hetty_key.pem
@dev = true @dev = true
@adminPath = $PWD/admin/build @adminPath = $PWD/admin/build

View file

@ -446,7 +446,7 @@ func (ec *executionContext) _HttpRequestLog_method(ctx context.Context, field gr
} }
res := resTmp.(HTTPMethod) res := resTmp.(HTTPMethod)
fc.Result = res fc.Result = res
return ec.marshalNHttpMethod2githubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPMethod(ctx, field.Selections, res) return ec.marshalNHttpMethod2githubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPMethod(ctx, field.Selections, res)
} }
func (ec *executionContext) _HttpRequestLog_proto(ctx context.Context, field graphql.CollectedField, obj *HTTPRequestLog) (ret graphql.Marshaler) { func (ec *executionContext) _HttpRequestLog_proto(ctx context.Context, field graphql.CollectedField, obj *HTTPRequestLog) (ret graphql.Marshaler) {
@ -576,7 +576,7 @@ func (ec *executionContext) _HttpRequestLog_response(ctx context.Context, field
} }
res := resTmp.(*HTTPResponseLog) res := resTmp.(*HTTPResponseLog)
fc.Result = res fc.Result = res
return ec.marshalOHttpResponseLog2ᚖgithubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPResponseLog(ctx, field.Selections, res) return ec.marshalOHttpResponseLog2ᚖgithubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPResponseLog(ctx, field.Selections, res)
} }
func (ec *executionContext) _HttpResponseLog_requestId(ctx context.Context, field graphql.CollectedField, obj *HTTPResponseLog) (ret graphql.Marshaler) { func (ec *executionContext) _HttpResponseLog_requestId(ctx context.Context, field graphql.CollectedField, obj *HTTPResponseLog) (ret graphql.Marshaler) {
@ -781,7 +781,7 @@ func (ec *executionContext) _Query_httpRequestLog(ctx context.Context, field gra
} }
res := resTmp.(*HTTPRequestLog) res := resTmp.(*HTTPRequestLog)
fc.Result = res fc.Result = res
return ec.marshalOHttpRequestLog2ᚖgithubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPRequestLog(ctx, field.Selections, res) return ec.marshalOHttpRequestLog2ᚖgithubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPRequestLog(ctx, field.Selections, res)
} }
func (ec *executionContext) _Query_httpRequestLogs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { func (ec *executionContext) _Query_httpRequestLogs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@ -815,7 +815,7 @@ func (ec *executionContext) _Query_httpRequestLogs(ctx context.Context, field gr
} }
res := resTmp.([]HTTPRequestLog) res := resTmp.([]HTTPRequestLog)
fc.Result = res fc.Result = res
return ec.marshalNHttpRequestLog2ᚕgithubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPRequestLogᚄ(ctx, field.Selections, res) return ec.marshalNHttpRequestLog2ᚕgithubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPRequestLogᚄ(ctx, field.Selections, res)
} }
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
@ -2359,20 +2359,20 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
return res return res
} }
func (ec *executionContext) unmarshalNHttpMethod2githubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPMethod(ctx context.Context, v interface{}) (HTTPMethod, error) { func (ec *executionContext) unmarshalNHttpMethod2githubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPMethod(ctx context.Context, v interface{}) (HTTPMethod, error) {
var res HTTPMethod var res HTTPMethod
return res, res.UnmarshalGQL(v) return res, res.UnmarshalGQL(v)
} }
func (ec *executionContext) marshalNHttpMethod2githubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPMethod(ctx context.Context, sel ast.SelectionSet, v HTTPMethod) graphql.Marshaler { func (ec *executionContext) marshalNHttpMethod2githubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPMethod(ctx context.Context, sel ast.SelectionSet, v HTTPMethod) graphql.Marshaler {
return v return v
} }
func (ec *executionContext) marshalNHttpRequestLog2githubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPRequestLog(ctx context.Context, sel ast.SelectionSet, v HTTPRequestLog) graphql.Marshaler { func (ec *executionContext) marshalNHttpRequestLog2githubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPRequestLog(ctx context.Context, sel ast.SelectionSet, v HTTPRequestLog) graphql.Marshaler {
return ec._HttpRequestLog(ctx, sel, &v) return ec._HttpRequestLog(ctx, sel, &v)
} }
func (ec *executionContext) marshalNHttpRequestLog2ᚕgithubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPRequestLogᚄ(ctx context.Context, sel ast.SelectionSet, v []HTTPRequestLog) graphql.Marshaler { func (ec *executionContext) marshalNHttpRequestLog2ᚕgithubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPRequestLogᚄ(ctx context.Context, sel ast.SelectionSet, v []HTTPRequestLog) graphql.Marshaler {
ret := make(graphql.Array, len(v)) ret := make(graphql.Array, len(v))
var wg sync.WaitGroup var wg sync.WaitGroup
isLen1 := len(v) == 1 isLen1 := len(v) == 1
@ -2396,7 +2396,7 @@ func (ec *executionContext) marshalNHttpRequestLog2ᚕgithubᚗcomᚋdstotijnᚋ
if !isLen1 { if !isLen1 {
defer wg.Done() defer wg.Done()
} }
ret[i] = ec.marshalNHttpRequestLog2githubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPRequestLog(ctx, sel, v[i]) ret[i] = ec.marshalNHttpRequestLog2githubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPRequestLog(ctx, sel, v[i])
} }
if isLen1 { if isLen1 {
f(i) f(i)
@ -2714,22 +2714,22 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast
return ec.marshalOBoolean2bool(ctx, sel, *v) return ec.marshalOBoolean2bool(ctx, sel, *v)
} }
func (ec *executionContext) marshalOHttpRequestLog2githubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPRequestLog(ctx context.Context, sel ast.SelectionSet, v HTTPRequestLog) graphql.Marshaler { func (ec *executionContext) marshalOHttpRequestLog2githubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPRequestLog(ctx context.Context, sel ast.SelectionSet, v HTTPRequestLog) graphql.Marshaler {
return ec._HttpRequestLog(ctx, sel, &v) return ec._HttpRequestLog(ctx, sel, &v)
} }
func (ec *executionContext) marshalOHttpRequestLog2ᚖgithubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPRequestLog(ctx context.Context, sel ast.SelectionSet, v *HTTPRequestLog) graphql.Marshaler { func (ec *executionContext) marshalOHttpRequestLog2ᚖgithubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPRequestLog(ctx context.Context, sel ast.SelectionSet, v *HTTPRequestLog) graphql.Marshaler {
if v == nil { if v == nil {
return graphql.Null return graphql.Null
} }
return ec._HttpRequestLog(ctx, sel, v) return ec._HttpRequestLog(ctx, sel, v)
} }
func (ec *executionContext) marshalOHttpResponseLog2githubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPResponseLog(ctx context.Context, sel ast.SelectionSet, v HTTPResponseLog) graphql.Marshaler { func (ec *executionContext) marshalOHttpResponseLog2githubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPResponseLog(ctx context.Context, sel ast.SelectionSet, v HTTPResponseLog) graphql.Marshaler {
return ec._HttpResponseLog(ctx, sel, &v) return ec._HttpResponseLog(ctx, sel, &v)
} }
func (ec *executionContext) marshalOHttpResponseLog2ᚖgithubᚗcomᚋdstotijnᚋgurpᚋpkgᚋapiᚐHTTPResponseLog(ctx context.Context, sel ast.SelectionSet, v *HTTPResponseLog) graphql.Marshaler { func (ec *executionContext) marshalOHttpResponseLog2ᚖgithubᚗcomᚋdstotijnᚋhettyᚋpkgᚋapiᚐHTTPResponseLog(ctx context.Context, sel ast.SelectionSet, v *HTTPResponseLog) graphql.Marshaler {
if v == nil { if v == nil {
return graphql.Null return graphql.Null
} }

View file

@ -7,7 +7,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/dstotijn/gurp/pkg/reqlog" "github.com/dstotijn/hetty/pkg/reqlog"
) )
type Resolver struct { type Resolver struct {

View file

@ -141,7 +141,7 @@ func (c *CertConfig) cert(hostname string) (*tls.Certificate, error) {
SerialNumber: serial, SerialNumber: serial,
Subject: pkix.Name{ Subject: pkix.Name{
CommonName: hostname, CommonName: hostname,
Organization: []string{"Gurp"}, Organization: []string{"Hetty"},
}, },
SubjectKeyId: c.keyID, SubjectKeyId: c.keyID,
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,

View file

@ -11,7 +11,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/dstotijn/gurp/pkg/proxy" "github.com/dstotijn/hetty/pkg/proxy"
"github.com/google/uuid" "github.com/google/uuid"
) )