// List the servers from the db
List the servers from the db
// List the servers from the db
func (s ServerService) List(ctx context.Context, r api.ServerListRequest) (*api.ServerListResponse, error) {
	s.logger.Debug("Getting Servers-list")
	var servers []api.Server
	if err := s.db.Find(&servers).Error; err != nil {
		s.logger.Error("Cannot get Servers-list", zap.String("exception", err.Error()))
		return nil, err
	}
	s.logger.Debug("Got Servers-list", zap.Int("amount", len(servers)))
	return &api.ServerListResponse{Servers: servers}, nil
}
func ( s ServerService ) List ( ctx context . Context , r api . ServerListRequest ) ( * api . ServerListResponse , error ) { s . logger . Debug ( " " ) var servers [ ] api . Server if err := s . db . Find ( & servers ) . Error ; err != nil { s . logger . Error ( " " , zap . String ( " " , err . Error ( ) ) ) return nil , err } s . logger . Debug ( " " , zap . Int ( " " , len ( servers ) ) ) return & api . ServerListResponse { Servers : servers } , nil }
List the servers from the db
List the servers from the db