Skip to content
This repository has been archived by the owner on May 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from h1alexbel/job-api
Browse files Browse the repository at this point in the history
root package javadocs
  • Loading branch information
Aliaksei Bialiauski authored Jan 25, 2023
2 parents 53b7eca + cff9344 commit c89d686
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 7 deletions.
41 changes: 40 additions & 1 deletion src/main/java/com/h1alexbel/k8sojo/Container.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,53 @@
/*
* Copyright (c) 2022 Aliaksei Bialiauski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.h1alexbel.k8sojo;

/**
* Container.
*
* @author Aliaksei Bialiauski ([email protected])
* @since 1.0
* @since 0.0.1
*/
public interface Container {

/**
* Name
*
* @return container name as string
*/
String name();

/**
* Image.
*
* @return container image as string
*/
String image();

/**
* Commands.
*
* @return list of commands
*/
Iterable<String> commands();
}
35 changes: 34 additions & 1 deletion src/main/java/com/h1alexbel/k8sojo/DcContainer.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,49 @@
/*
* Copyright (c) 2022 Aliaksei Bialiauski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.h1alexbel.k8sojo;

import lombok.RequiredArgsConstructor;

/**
* Docker container.
*
* @author Aliaksei Bialiauski ([email protected])
* @since 1.0
* @since 0.0.1
*/
@RequiredArgsConstructor
public final class DcContainer implements Container {

/**
* Container name.
*/
private final String name;
/**
* Container image.
*/
private final String image;
/**
* Container commands.
*/
private final Iterable<String> commands;

@Override
Expand Down
46 changes: 45 additions & 1 deletion src/main/java/com/h1alexbel/k8sojo/Kojo.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,60 @@
/*
* Copyright (c) 2022 Aliaksei Bialiauski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.h1alexbel.k8sojo;

/**
* Kubernetes Object.
*
* @author Aliaksei Bialiauski ([email protected])
* @since 1.0
* @since 0.0.1
*/
public interface Kojo {

/**
* Api version.
*
* @return api version as string
*/
String apiVersion();

/**
* Kind.
*
* @return kind as string
*/
String kind();

/**
* Metadata.
*
* @return metadata
*/
Metadata meta();

/**
* Spec.
*
* @return spec
*/
Spec spec();
}
31 changes: 30 additions & 1 deletion src/main/java/com/h1alexbel/k8sojo/Metadata.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
/*
* Copyright (c) 2022 Aliaksei Bialiauski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.h1alexbel.k8sojo;

/**
* Kubernetes metadata.
*
* @author Aliaksei Bialiauski ([email protected])
* @since 1.0
* @since 0.0.1
*/
public interface Metadata {

/**
* Name.
*
* @return name as string
*/
String name();
}
36 changes: 35 additions & 1 deletion src/main/java/com/h1alexbel/k8sojo/Spec.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
/*
* Copyright (c) 2022 Aliaksei Bialiauski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.h1alexbel.k8sojo;

/**
* Kubernetes spec.
*
* @author Aliaksei Bialiauski ([email protected])
* @since 1.0
* @since 0.0.1
*/
public interface Spec {

/**
* Template.
*
* @return template
*/
Template template();

/**
* BackOffLimit.
*
* @return backoff limit as int
*/
int backOffLimit();
}
31 changes: 30 additions & 1 deletion src/main/java/com/h1alexbel/k8sojo/Template.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
/*
* Copyright (c) 2022 Aliaksei Bialiauski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.h1alexbel.k8sojo;

/**
* Template
*
* @author Aliaksei Bialiauski ([email protected])
* @since 1.0
* @since 0.0.1
*/
public interface Template {

/**
* Template spec.
*
* @return spec
*/
TemplateSpec spec();
}
34 changes: 33 additions & 1 deletion src/main/java/com/h1alexbel/k8sojo/TemplateSpec.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@
/*
* Copyright (c) 2022 Aliaksei Bialiauski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package com.h1alexbel.k8sojo;

/**
* @author Aliaksei Bialiauski ([email protected])
* @since 1.0
* @since 0.0.1
*/
public interface TemplateSpec {

/**
* Containers.
*
* @return list of containers
*/
Iterable<Container> containers();

/**
* Restart policy.
*
* @return restart policy as string
*/
String restartPolicy();
}
28 changes: 28 additions & 0 deletions src/main/java/com/h1alexbel/k8sojo/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2022 Aliaksei Bialiauski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/** K8sojo
* @author Aliaksei Bialiauski ([email protected])
* @since 0.0.1
*/

package com.h1alexbel.k8sojo;

0 comments on commit c89d686

Please sign in to comment.