All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.strimzi.crdgenerator.KubeLinker Maven / Gradle / Ivy

There is a newer version: 0.44.0
Show newest version
/*
 * Copyright Strimzi authors.
 * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
 */
package io.strimzi.crdgenerator;

import io.strimzi.crdgenerator.annotations.KubeLink;

public class KubeLinker implements Linker {
    private final String baseUrl;

    public KubeLinker(String baseUrl) {
        //https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/
        this.baseUrl = baseUrl;
    }

    @Override
    public String link(KubeLink kubeLink) {
        //https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#networkpolicyingressrule-v1-networking-k8s-io
        return baseUrl + "#" + kubeLink.kind() + "-" + kubeLink.version() + "-" + kubeLink.group().replace(".", "-");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy