package com.atlassian.bitbucket.internal.mirroring.mirror.nav;

import com.atlassian.bitbucket.mirroring.mirror.UpstreamServer;

import javax.annotation.Nonnull;

/**
 * Provides URLs to access the upstream
 */
public interface UpstreamNavBuilder {
    /**
     * @return the URL for configuring the mirror on the upstream
     */
    @Nonnull
    MirroringUrl admin();

    /**
     * @return the URL for authorizing the mirror on the upstream after the mirror has registered itself
     */
    @Nonnull
    MirroringUrl authorizeAddon();

    /**
     * @return the URL for the supplied path relative to the upstream's {@link UpstreamServer#getBaseUrl() base URL}
     */
    @Nonnull
    MirroringUrl relativeToBase(@Nonnull String path);

    /**
     * @param id repository ID
     * @return the URL for retrieving repository details on the upstream
     */
    @Nonnull
    MirroringUrl repositoryById(@Nonnull String id);
}
