Skip to content

router: add initial API client - #95

Open
mweibel wants to merge 6 commits into
masterfrom
router
Open

router: add initial API client#95
mweibel wants to merge 6 commits into
masterfrom
router

Conversation

@mweibel

@mweibel mweibel commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@mweibel
mweibel force-pushed the router branch 4 times, most recently from 1134c0b to 97c2123 Compare July 24, 2026 12:42
@mweibel
mweibel force-pushed the router branch 6 times, most recently from 3d32913 to f7be2fe Compare August 4, 2026 14:48
@mweibel
mweibel force-pushed the router branch 2 times, most recently from a1cf745 to ffb34d1 Compare August 5, 2026 14:22
@mweibel
mweibel marked this pull request as ready for review August 5, 2026 14:47
Comment thread test/integration/routers_integration_test.go Outdated
Comment thread router.go
Version int `json:"version"`
ReversePTR *string `json:"reverse_ptr"`
}
type RouterInterface struct {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there will be a interface API at some point in the not so far future, is going for RouterInterface the right direction? I assumed we would use a generic Interface Type.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially wanted to use interface but we have already an interface type (and, accordingly, an Address type):

type Interface struct {
Type string `json:"type,omitempty"`
Network NetworkStub `json:"network,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
}
type Address struct {
Version int `json:"version"`
Address string `json:"address"`
PrefixLength int `json:"prefix_length"`
Gateway string `json:"gateway"`
ReversePtr string `json:"reverse_ptr"`
Subnet SubnetStub `json:"subnet"`
}

The question I guess is, what do we do. We can e.g. rename the existing Interface to ServerInterface or LegacyInterface because we plan to unify them, and we'll need a new major version anyway due to #91, or we find another name.
Your opinon?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, keep RouterInterface as submitted. On the server, rename the Interface to ServerInterface. This will be a breaking change, but it keeps the naming consistent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Comment thread test/integration/routers_integration_test.go
Base automatically changed from improve-go-setup to master August 7, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants