...

Source file src/go.formulabun.club/replays/ingest/server/go/model_graphql.go

Documentation: go.formulabun.club/replays/ingest/server/go

     1  /*
     2   * GoBun File Info
     3   *
     4   * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     5   *
     6   * API version: 0.0.1
     7   * Generated by: OpenAPI Generator (https://openapi-generator.tech)
     8   */
     9  
    10  package openapi
    11  
    12  type Graphql struct {
    13  
    14  	Data map[string]interface{} `json:"data,omitempty"`
    15  
    16  	Errors []map[string]interface{} `json:"errors,omitempty"`
    17  }
    18  
    19  // AssertGraphqlRequired checks if the required fields are not zero-ed
    20  func AssertGraphqlRequired(obj Graphql) error {
    21  	return nil
    22  }
    23  
    24  // AssertRecurseGraphqlRequired recursively checks if required fields are not zero-ed in a nested slice.
    25  // Accepts only nested slice of Graphql (e.g. [][]Graphql), otherwise ErrTypeAssertionError is thrown.
    26  func AssertRecurseGraphqlRequired(objSlice interface{}) error {
    27  	return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error {
    28  		aGraphql, ok := obj.(Graphql)
    29  		if !ok {
    30  			return ErrTypeAssertionError
    31  		}
    32  		return AssertGraphqlRequired(aGraphql)
    33  	})
    34  }
    35  

View as plain text