Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add links to ngrok docs where relevant #35

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions ngrok-java/src/main/java/com/ngrok/EndpointBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,39 @@ public abstract class EndpointBuilder<T extends EndpointBuilder> extends Metadat
private Optional<String> forwardsTo = Optional.empty();

/**
* Adds a CIDR to the list of allowed CIDRs for this builder.
* Adds a CIDR to the list of allowed CIDRs for this endpoint.
*
* @param allowCIDR The parameter "allowCIDR" is a string that represents a
* Classless Inter-Domain Routing (CIDR) notation. It is used to specify
* a range of IP addresses that are allowed. For example, 10.0.0.0/24
* @return An instance the builder represented by type T
*
* @see <a href="https://ngrok.com/docs/http/ip-restrictions/">IP Restrictions</a>
* in the ngrok docs for additional details.
*/
public T allowCIDR(String allowCIDR) {
this.allowCIDR.add(allowCIDR);
return (T) this;
}

/**
* Adds a CIDR to the list of denied CIDRs for this builder.
* Adds a CIDR to the list of denied CIDRs for this endpoint.
*
* @param denyCIDR The parameter "denyCIDR" is a string that represents a
* Classless Inter-Domain Routing (CIDR) notation. It is used to specify a
* range of IP addresses that should be denied access. For example, 10.0.0.0/24
* @return An instance the builder represented by type T
*
* @see <a href="https://ngrok.com/docs/http/ip-restrictions/">IP Restrictions</a>
* in the ngrok docs for additional details.
*/
public T denyCIDR(String denyCIDR) {
this.denyCIDR.add(denyCIDR);
return (T) this;
}

/**
* Sets the proxy protocol for this builder.
* Sets the proxy protocol for this endpoint.
*
* @param proxyProto the proxy protocol for the builder
* @return An instance the builder represented by type T
Expand All @@ -54,7 +60,7 @@ public T proxyProto(ProxyProto proxyProto) {
}

/**
* Sets the forwarding address for this builder.
* Sets the forwarding address for this endpoint.
*
* @param forwardsTo the forwarding address for the builder
* @return An instance the builder represented by type T
Expand All @@ -65,7 +71,7 @@ public T forwardsTo(String forwardsTo) {
}

/**
* Returns a list of strings representing allowed CIDR addresses.
* Returns a list of strings representing allowed CIDR addresses for this endpoint.
*
* @return the currently set allow CIDR addresses
*/
Expand All @@ -74,7 +80,7 @@ public List<String> getAllowCIDR() {
}

/**
* Returns a list of strings representing denied CIDR addresses.
* Returns a list of strings representing denied CIDR addresses for this endpoint.
*
* @return the currently set deny CIDR addresses
*/
Expand All @@ -92,7 +98,7 @@ public ProxyProto getProxyProto() {
}

/**
* Returns the version of the proxy protocol for this builder.
* Returns the version of the proxy protocol for this endpoint.
*
* @return the currently set version of the proxy protocol
*/
Expand All @@ -101,7 +107,7 @@ public long getProxyProtoVersion() {
}

/**
* Returns the forwarding address for this builder.
* Returns the forwarding address for this endpoint.
*
* @return the currently set forwarding address
*/
Expand Down
12 changes: 12 additions & 0 deletions ngrok-java/src/main/java/com/ngrok/Http.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public String getValue() {

/**
* Represents basic authentication options for an HTTP listener.
*
* @see <a href="https://ngrok.com/docs/http/basic-auth/">Basic Auth</a>
* in the ngrok docs for additional details.
*/
class BasicAuth {
private final String username;
Expand Down Expand Up @@ -100,6 +103,9 @@ public String getPassword() {

/**
* Represents OAuth configuration for an HTTP listener.
*
* @see <a href="https://ngrok.com/docs/http/oauth/">OAuth</a>
* in the ngrok docs for additional details.
*/
class OAuth {
private final String provider;
Expand Down Expand Up @@ -230,6 +236,9 @@ public List<String> getScopes() {

/**
* Represents OIDC configuration for an HTTP listener.
*
* @see <a href="https://ngrok.com/docs/http/openid-connect/">OpenID Connect</a>
* in the ngrok docs for additional details.
*/
class OIDC {
private final String issuerUrl;
Expand Down Expand Up @@ -343,6 +352,9 @@ public List<String> getScope() {

/**
* Represents webhook verification options for an HTTP listener.
*
* @see <a href="https://ngrok.com/docs/http/webhook-verification/">Webhook Verification</a>
* in the ngrok docs for additional details.
*/
class WebhookVerification {
private final String provider;
Expand Down
Loading
Loading