package
0.3.1
Repository: https://github.com/kotalco/core-api.git
Documentation: pkg.go.dev

# Functions

Count returns total number of validators 1-call validator service to get exiting node list 2-create X-Total-Count header with the length 3-return.
Create creates Ethereum 2.0 validator client from spec 1-Todo validate request body and return validation error 2-call validator service to create validator model 2-marshall node to dto and format the response.
Delete deletes Ethereum 2.0 validator client by name 1-get node from locals which checked and assigned by ValidateNodeExist 2-call validator service to delete the node 3-return ok if deleted with no errors.
Get gets a single Ethereum 2.0 validator client by name 1-get the node validated from ValidateNodeExist method 2-marshall node to dto and format the response.
List returns all Ethereum 2.0 validator clients 1-get the pagination qs default to 0 2-call service to return node models 3-make the pagination 3-marshall nodes to validator dto and format the response using NewResponse.
Update updates Ethereum 2.0 validator client by name from spec 1-todo validate request body and return validation errors if exits 2-get node from locals which checked and assigned by ValidateNodeExist 3-call validator service to update node which returns *ethereum2v1alpha1.Validator 4-marshall node to node dto and format the response.
ValidateValidatorExist validate node by name exist acts as a validation for all handlers the needs to find validator by name 1-call validator service to check if node exits 2-return 404 if it's not 3-save the node to local with the key node to be used by the other handlers.