Skip to content

Refacto/improve code quality #11

Open
@tchapacan

Description

@tchapacan

The code has been pushed in early stage and i'm a beginner in rust, so I'm sure there is a plenty of room for improvement.

I didn't want to overengineer the codebase for such a simple usecase, but some part can be improve and discuss:

Seek if we can use leverage a proper datastructure / type and iterate through it to pass parameter while using the querying method?

  • In client.rs separate the logic of building the different type of query (post, post_authenticated, login, logout) and the actual query to retrieve metrics (get_wan_config, get_status, get_devices, etc..), some how like a service <==> adapter "pattern"

  • If you are confident enough in rust, dig deeper in the structure of the project (module, trait, "class") etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions