mirror of
https://github.com/stashapp/stash.git
synced 2025-12-15 12:52:38 +01:00
* Add gql client generation files * Update dependencies * Add stash-box client generation to the makefile * Move scraped scene object matchers to models * Add stash-box to scrape with dropdown * Add scrape scene from fingerprint in UI
27 lines
575 B
Go
27 lines
575 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/99designs/gqlgen/api"
|
|
"github.com/Yamashou/gqlgenc/clientgen"
|
|
"github.com/Yamashou/gqlgenc/config"
|
|
"github.com/Yamashou/gqlgenc/generator"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
cfg, err := config.LoadConfig(".gqlgenc.yml")
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "%+v", err.Error())
|
|
os.Exit(2)
|
|
}
|
|
|
|
clientPlugin := clientgen.New(cfg.Query, cfg.Client)
|
|
if err := generator.Generate(ctx, cfg, api.AddPlugin(clientPlugin)); err != nil {
|
|
fmt.Fprintf(os.Stderr, "%+v", err.Error())
|
|
os.Exit(4)
|
|
}
|
|
}
|