...

Source file src/go.formulabun.club/replays/ingest/server/go/model_player_entry.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 PlayerEntry struct {
    13  
    14  	Name string `json:"Name,omitempty"`
    15  
    16  	Skin string `json:"Skin,omitempty"`
    17  
    18  	Color string `json:"Color,omitempty"`
    19  
    20  	Score float32 `json:"Score,omitempty"`
    21  
    22  	Speed float32 `json:"Speed,omitempty"`
    23  
    24  	Weight float32 `json:"Weight,omitempty"`
    25  }
    26  
    27  // AssertPlayerEntryRequired checks if the required fields are not zero-ed
    28  func AssertPlayerEntryRequired(obj PlayerEntry) error {
    29  	return nil
    30  }
    31  
    32  // AssertRecursePlayerEntryRequired recursively checks if required fields are not zero-ed in a nested slice.
    33  // Accepts only nested slice of PlayerEntry (e.g. [][]PlayerEntry), otherwise ErrTypeAssertionError is thrown.
    34  func AssertRecursePlayerEntryRequired(objSlice interface{}) error {
    35  	return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error {
    36  		aPlayerEntry, ok := obj.(PlayerEntry)
    37  		if !ok {
    38  			return ErrTypeAssertionError
    39  		}
    40  		return AssertPlayerEntryRequired(aPlayerEntry)
    41  	})
    42  }
    43  

View as plain text