forked from LaconicNetwork/kompose
Add new examples to kompose (#1803)
#### What type of PR is this? <!-- Add one of the following kinds: /kind bug /kind documentation /kind feature --> /kind cleanup #### What this PR does / why we need it: Fixes the current broken examples by: * Removing all the old incompatible ones (we do not really support v3 anymore or v2... since switching libraries) * Uses quay.io/kompose/web as our front end example which is a fork of the guestbook-go kubernetes examples #### Which issue(s) this PR fixes: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Closes https://github.com/kubernetes/kompose/issues/1757 #### Special notes for your reviewer: Test using docker-compose (you'll see it come up!), then try with kompose :) Signed-off-by: Charlie Drage <charlie@charliedrage.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- "1.8"
|
||||
- "1.9"
|
||||
- "1.10"
|
||||
- "1.11"
|
||||
- "1.12"
|
||||
- "1.13"
|
||||
- "1.14"
|
||||
- tip
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
Copyright 2021 Alexander F. Rødseth
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
# pinterface
|
||||
|
||||
[](https://goreportcard.com/report/github.com/xyproto/pinterface) [](https://raw.githubusercontent.com/xyproto/pinterface/main/LICENSE)
|
||||
|
||||
Interface types for `simple*` and `permission*` packages.
|
||||
|
||||
Interfaces for:
|
||||
---------------
|
||||
|
||||
* Redis: [permissions2](https://github.com/xyproto/permissions2) and [simpleredis](https://github.com/xyproto/simpleredis)
|
||||
* Bolt: [permissionbolt](https://github.com/xyproto/permissionbolt) and [simplebolt](https://github.com/xyproto/simplebolt)
|
||||
* MariaDB/MySQL: [permissionsql](https://github.com/xyproto/permissionsql) and [simplemaria](https://github.com/xyproto/simplemaria)
|
||||
* PostgreSQL: [pstore](https://github.com/xyproto/pstore) and [simplehstore](https://github.com/xyproto/simplehstore)
|
||||
|
||||
[](https://repology.org/project/go:github-xyproto-pinterface/versions)
|
||||
|
||||
General information
|
||||
-------------------
|
||||
|
||||
* Version: 1.5.3 (The tag is `v1.5.3` to work better with `go mod`. The API has version `5.3`.)
|
||||
* License: BSD-3
|
||||
* Author: Alexander F. Rødseth <xyproto@archlinux.org>
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
// Package pinterface provides interface types for the xyproto/simple* and xyproto/permission* packages
|
||||
package pinterface
|
||||
|
||||
import "net/http"
|
||||
|
||||
// Version is the API version. The API is stable within the same major version number
|
||||
const Version = 5.3
|
||||
|
||||
// Database interfaces
|
||||
|
||||
type IList interface {
|
||||
Add(value string) error
|
||||
All() ([]string, error)
|
||||
Clear() error
|
||||
LastN(n int) ([]string, error)
|
||||
Last() (string, error)
|
||||
Remove() error
|
||||
}
|
||||
|
||||
type ISet interface {
|
||||
Add(value string) error
|
||||
All() ([]string, error)
|
||||
Clear() error
|
||||
Del(value string) error
|
||||
Has(value string) (bool, error)
|
||||
Remove() error
|
||||
}
|
||||
|
||||
type IHashMap interface {
|
||||
All() ([]string, error)
|
||||
Clear() error
|
||||
DelKey(owner, key string) error
|
||||
Del(key string) error
|
||||
Exists(owner string) (bool, error)
|
||||
Get(owner, key string) (string, error)
|
||||
Has(owner, key string) (bool, error)
|
||||
Keys(owner string) ([]string, error)
|
||||
Remove() error
|
||||
Set(owner, key, value string) error
|
||||
}
|
||||
|
||||
type IHashMap2 interface {
|
||||
All() ([]string, error)
|
||||
AllWhere(key, value string) ([]string, error)
|
||||
Clear() error
|
||||
Count() (int64, error)
|
||||
DelKey(owner, key string) error
|
||||
Del(key string) error
|
||||
Empty() (bool, error)
|
||||
Exists(owner string) (bool, error)
|
||||
GetMap(owner string, keys []string) (map[string]string, error)
|
||||
Get(owner, key string) (string, error)
|
||||
Has(owner, key string) (bool, error)
|
||||
Keys(owner string) ([]string, error)
|
||||
Remove() error
|
||||
SetLargeMap(all map[string]map[string]string) error
|
||||
SetMap(owner string, m map[string]string) error
|
||||
Set(owner, key, value string) error
|
||||
}
|
||||
|
||||
type IKeyValue interface {
|
||||
Clear() error
|
||||
Del(key string) error
|
||||
Get(key string) (string, error)
|
||||
Inc(key string) (string, error)
|
||||
Remove() error
|
||||
Set(key, value string) error
|
||||
}
|
||||
|
||||
// Interface for making it possible to depend on different versions of the permission package,
|
||||
// or other packages that implement userstates.
|
||||
type IUserState interface {
|
||||
AddUnconfirmed(username, confirmationCode string)
|
||||
AddUser(username, password, email string)
|
||||
AdminRights(req *http.Request) bool
|
||||
AllUnconfirmedUsernames() ([]string, error)
|
||||
AllUsernames() ([]string, error)
|
||||
AlreadyHasConfirmationCode(confirmationCode string) bool
|
||||
BooleanField(username, fieldname string) bool
|
||||
ClearCookie(w http.ResponseWriter)
|
||||
ConfirmationCode(username string) (string, error)
|
||||
ConfirmUserByConfirmationCode(confirmationcode string) error
|
||||
Confirm(username string)
|
||||
CookieSecret() string
|
||||
CookieTimeout(username string) int64
|
||||
CorrectPassword(username, password string) bool
|
||||
Email(username string) (string, error)
|
||||
FindUserByConfirmationCode(confirmationcode string) (string, error)
|
||||
GenerateUniqueConfirmationCode() (string, error)
|
||||
HashPassword(username, password string) string
|
||||
HasUser(username string) bool
|
||||
IsAdmin(username string) bool
|
||||
IsConfirmed(username string) bool
|
||||
IsLoggedIn(username string) bool
|
||||
Login(w http.ResponseWriter, username string) error
|
||||
Logout(username string)
|
||||
MarkConfirmed(username string)
|
||||
PasswordAlgo() string
|
||||
PasswordHash(username string) (string, error)
|
||||
RemoveAdminStatus(username string)
|
||||
RemoveUnconfirmed(username string)
|
||||
RemoveUser(username string)
|
||||
SetAdminStatus(username string)
|
||||
SetBooleanField(username, fieldname string, val bool)
|
||||
SetCookieSecret(cookieSecret string)
|
||||
SetCookieTimeout(cookieTime int64)
|
||||
SetLoggedIn(username string)
|
||||
SetLoggedOut(username string)
|
||||
SetMinimumConfirmationCodeLength(length int)
|
||||
SetPasswordAlgo(algorithm string) error
|
||||
SetPassword(username, password string)
|
||||
SetUsernameCookie(w http.ResponseWriter, username string) error
|
||||
UsernameCookie(req *http.Request) (string, error)
|
||||
Username(req *http.Request) string
|
||||
UserRights(req *http.Request) bool
|
||||
|
||||
Creator() ICreator
|
||||
Host() IHost
|
||||
Users() IHashMap
|
||||
}
|
||||
|
||||
// Data structure creator
|
||||
type ICreator interface {
|
||||
NewHashMap(id string) (IHashMap, error)
|
||||
NewKeyValue(id string) (IKeyValue, error)
|
||||
NewList(id string) (IList, error)
|
||||
NewSet(id string) (ISet, error)
|
||||
}
|
||||
|
||||
// Database host (or file)
|
||||
type IHost interface {
|
||||
Close()
|
||||
Ping() error
|
||||
}
|
||||
|
||||
// Redis host (implemented structures can also be an IHost, of course)
|
||||
type IRedisHost interface {
|
||||
DatabaseIndex()
|
||||
Pool()
|
||||
}
|
||||
|
||||
// Redis data structure creator
|
||||
type IRedisCreator interface {
|
||||
SelectDatabase(dbindex int)
|
||||
}
|
||||
|
||||
// Middleware for permissions
|
||||
type IPermissions interface {
|
||||
AddAdminPath(prefix string)
|
||||
AddPublicPath(prefix string)
|
||||
AddUserPath(prefix string)
|
||||
Clear()
|
||||
DenyFunction() http.HandlerFunc
|
||||
Rejected(w http.ResponseWriter, req *http.Request) bool
|
||||
ServeHTTP(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
|
||||
SetAdminPath(pathPrefixes []string)
|
||||
SetDenyFunction(f http.HandlerFunc)
|
||||
SetPublicPath(pathPrefixes []string)
|
||||
SetUserPath(pathPrefixes []string)
|
||||
UserState() IUserState
|
||||
}
|
||||
Reference in New Issue
Block a user