text stringlengths 1 1.05M |
|---|
/*
* Copyright (C) 2012-2014 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package info.archinnov.achilles.persistence;
import com.datastax.driver.core.RegularStatement;
import com.google.common.base.Optional;
import info.archinnov.achilles.exception.AchillesException;
import info.archinnov.achilles.internal.context.BatchingFlushContext;
import info.archinnov.achilles.internal.context.ConfigurationContext;
import info.archinnov.achilles.internal.context.DaoContext;
import info.archinnov.achilles.internal.context.PersistenceContextFactory;
import info.archinnov.achilles.internal.context.facade.PersistenceManagerOperations;
import info.archinnov.achilles.internal.metadata.holder.EntityMeta;
import info.archinnov.achilles.internal.statement.wrapper.NativeQueryLog;
import info.archinnov.achilles.internal.statement.wrapper.NativeStatementWrapper;
import info.archinnov.achilles.internal.utils.UUIDGen;
import info.archinnov.achilles.listener.CASResultListener;
import info.archinnov.achilles.internal.persistence.operations.NativeQueryValidator;
import info.archinnov.achilles.type.ConsistencyLevel;
import info.archinnov.achilles.type.Options;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
import static info.archinnov.achilles.internal.consistency.ConsistencyConverter.getCQLLevel;
import static info.archinnov.achilles.type.OptionsBuilder.noOptions;
/**
* <p>
* Create a Batch session to perform
* <ul>
* <li>
* <em>insert()</em>
* </li>
* <li>
* <em>update()</em>
* </li>
* <li>
* <em>delete()</em>
* </li>
* <li>
* <em>deleteById()</em>
* </li>
* </ul>
*
* This Batch is a <strong>state-full</strong> object that stacks up all operations. They will be flushed upon call to
* <em>flushBatch()</em>
*
* <br/>
* <br/>
*
* There are 2 types of batch: <strong>ordered</strong> and <strong>unordered</strong>. Ordered batches will automatically add
* increasing generated timestamp for each statement so that their ordering is guaranteed.
*
* <pre class="code"><code class="java">
*
* Batch batch = manager.createBatch();
*
* batch.insert(new User(10L, "John","LENNNON")); // nothing happens here
*
* batch.flushBatch(); // send the INSERT statement to Cassandra
*
* </code></pre>
*
* @see <a href="https://github.com/doanduyhai/Achilles/wiki/Batch-Mode" target="_blank">Batch Mode</a>
*
*/
public class Batch extends CommonPersistenceManager {
private static final Logger log = LoggerFactory.getLogger(Batch.class);
protected BatchingFlushContext flushContext;
protected NativeQueryValidator validator = NativeQueryValidator.Singleton.INSTANCE.get();
private final ConsistencyLevel defaultConsistencyLevel;
private final boolean orderedBatch;
Batch(Map<Class<?>, EntityMeta> entityMetaMap, PersistenceContextFactory contextFactory,
DaoContext daoContext, ConfigurationContext configContext, boolean orderedBatch) {
super(entityMetaMap, contextFactory, daoContext, configContext);
this.defaultConsistencyLevel = configContext.getDefaultWriteConsistencyLevel();
this.orderedBatch = orderedBatch;
this.flushContext = new BatchingFlushContext(daoContext, defaultConsistencyLevel, Optional.<com.datastax.driver.core.ConsistencyLevel>absent());
}
/**
* Start a batch session.
*/
public void startBatch() {
log.debug("Starting batch mode");
flushContext = flushContext.duplicateWithNoData(defaultConsistencyLevel);
}
/**
* Start a batch session with write consistency level
*/
public void startBatch(ConsistencyLevel consistencyLevel) {
log.debug("Starting batch mode with consistency level {}", consistencyLevel.name());
flushContext = flushContext.duplicateWithNoData(consistencyLevel);
}
/**
* Start a batch session with write consistency level and write serial consistency level
*/
public void startBatch(ConsistencyLevel consistencyLevel, ConsistencyLevel serialConsistency) {
log.debug("Starting batch mode with consistency level {}", consistencyLevel.name());
Optional<com.datastax.driver.core.ConsistencyLevel> serialConsistencyLevel = Optional.absent();
if (serialConsistency != null) {
serialConsistencyLevel = Optional.fromNullable(getCQLLevel(serialConsistency));
}
flushContext = flushContext.duplicateWithNoData(consistencyLevel, serialConsistencyLevel);
}
/**
* End an existing batch and flush all the pending statements.
*
* Do nothing if there is no pending statement
*
*/
public void endBatch() {
log.debug("Ending batch mode");
try {
flushContext.endBatch();
} finally {
flushContext = flushContext.duplicateWithNoData(defaultConsistencyLevel);
}
}
/**
* Cleaning all pending statements for the current batch session.
*/
public void cleanBatch() {
log.debug("Cleaning all pending statements");
flushContext = flushContext.duplicateWithNoData(defaultConsistencyLevel);
}
/**
* Batch insert an entity.
*
* <pre class="code"><code class="java">
* // Insert
* Batch batch = manager.createBatch();
*
* MyEntity managedEntity = batch.insert(myEntity);
*
* ...
*
* batch.flushBatch();
* </code></pre>
*
* @param entity
* Entity to be inserted
* @return proxified entity
*/
@Override
public <T> T insert(final T entity) {
return super.insert(entity, maybeAddTimestampToStatement(noOptions()));
}
/**
* Batch insert an entity with the given options.
*
* <pre class="code"><code class="java">
* // Insert
* Batch batch = manager.createBatch();
*
* MyEntity managedEntity = batch.insert(myEntity, OptionsBuilder.withTtl(3600));
*
* ...
*
* batch.flushBatch();
* </code></pre>
*
* @param entity
* Entity to be inserted
* @param options
* options
* @return proxified entity
*/
@Override
public <T> T insert(final T entity, Options options) {
if (options.getConsistencyLevel().isPresent()) {
flushContext = flushContext.duplicateWithNoData();
throw new AchillesException("Runtime custom Consistency Level cannot be set for batch mode. Please set the Consistency Levels at batch start with 'startBatch(consistencyLevel)'");
} else {
return super.insert(entity, maybeAddTimestampToStatement(options));
}
}
/**
* Batch update a "managed" entity
*
* <pre class="code"><code class="java">
* Batch batch = manager.createBatch();
* User managedUser = manager.find(User.class,1L);
*
* user.setFirstname("DuyHai");
*
* batch.update(user);
*
* ...
*
* batch.flushBatch();
* </code></pre>
*
* @param entity
* Managed entity to be updated
*/
@Override
public void update(Object entity) {
super.update(entity, maybeAddTimestampToStatement(noOptions()));
}
/**
* Update a "managed" entity with options
*
* <pre class="code"><code class="java">
* Batch batch = manager.createBatch();
* User managedUser = manager.find(User.class,1L);
*
* user.setFirstname("DuyHai");
*
* batch.update(user, OptionsBuilder.withTtl(10));
*
* ...
*
* batch.flushBatch();
* </code></pre>
*
* @param entity
* Managed entity to be updated
* @param options
* options
*/
@Override
public void update(Object entity, Options options) {
if (options.getConsistencyLevel().isPresent()) {
flushContext = flushContext.duplicateWithNoData();
throw new AchillesException("Runtime custom Consistency Level cannot be set for batch mode. Please set the Consistency Levels at batch start with 'startBatch(consistencyLevel)'");
} else {
super.update(entity, maybeAddTimestampToStatement(options));
}
}
/**
* Batch insert a "transient" entity or update a "managed" entity.
*
* Shorthand to insert() or update()
*
* @param entity
* Managed entity to be inserted/updated
*
* @return proxified entity
*/
public <T> T insertOrUpdate(T entity) {
return this.insertOrUpdate(entity,noOptions());
}
/**
* Batch insert a "transient" entity or update a "managed" entity with options.
*
* Shorthand to insert() or update()
*
* @param entity
* Managed entity to be inserted/updated
* @param options
* options
*/
public <T> T insertOrUpdate(T entity, Options options) {
log.debug("Inserting or updating entity '{}' with options {}", proxifier.getRealObject(entity), options);
if (options.getConsistencyLevel().isPresent()) {
flushContext = flushContext.duplicateWithNoData();
throw new AchillesException("Runtime custom Consistency Level cannot be set for batch mode. Please set the Consistency Levels at batch start with 'startBatch(consistencyLevel)'");
} else {
entityValidator.validateEntity(entity, entityMetaMap);
if (proxifier.isProxy(entity)) {
super.update(entity, maybeAddTimestampToStatement(options));
return entity;
} else {
return super.insert(entity, maybeAddTimestampToStatement(options));
}
}
}
/**
* Batch delete an entity.
*
* <pre class="code"><code class="java">
* // Simple deletion
* Batch batch = manager.createBatch();
* User managedUser = manager.find(User.class,1L);
*
* batch.delete(managedUser);
*
* ...
*
* batch.flushBatch();
* </code></pre>
*
* @param entity
* Entity to be deleted
*/
@Override
public void delete(final Object entity) {
super.delete(entity, maybeAddTimestampToStatement(noOptions()));
}
/**
* Batch delete an entity with the given options.
*
* <pre class="code"><code class="java">
* // Deletion with option
* Batch batch = manager.createBatch();
* User managedUser = manager.find(User.class,1L);
*
* batch.delete(managedUser, OptionsBuilder.withTimestamp(20292382030L));
*
* ...
*
* batch.flushBatch();
* </code></pre>
*
* @param entity
* Entity to be deleted
* @param options
* options for consistency level and timestamp
*/
@Override
public void delete(final Object entity, Options options) {
if (options.getConsistencyLevel().isPresent()) {
flushContext = flushContext.duplicateWithNoData();
throw new AchillesException("Runtime custom Consistency Level cannot be set for batch mode. Please set the Consistency Levels at batch start with 'startBatch(consistencyLevel)'");
} else {
super.delete(entity, maybeAddTimestampToStatement(options));
}
}
/**
* Batch delete an entity by its id.
*
* <pre class="code"><code class="java">
* // Direct deletion without read-before-write
* Batch batch = manager.createBatch();
* batch.deleteById(User.class,1L);
*
* ...
*
* batch.flushBatch();
* </code></pre>
*
* @param entityClass
* Entity class
*
* @param primaryKey
* Primary key
*/
@Override
public void deleteById(Class<?> entityClass, Object primaryKey) {
super.deleteById(entityClass, primaryKey, maybeAddTimestampToStatement(noOptions()));
}
/**
* Batch delete an entity by its id with the given options.
*
* <pre class="code"><code class="java">
* // Direct deletion without read-before-write
* Batch batch = manager.createBatch();
* batch.deleteById(User.class,1L, Options.withTimestamp(32234424234L));
*
* ...
*
* batch.flushBatch();
* </code></pre>
*
* @param entityClass
* Entity class
*
* @param primaryKey
* Primary key
*/
@Override
public void deleteById(Class<?> entityClass, Object primaryKey, Options options) {
super.deleteById(entityClass, primaryKey, maybeAddTimestampToStatement(options));
}
/**
*
* Add a native CQL3 statement to the current batch.
* <br/>
* <br/>
* <strong>This statement should be an INSERT or UPDATE</strong>, otherwise Achilles will raise an exception
*
* <pre class="code"><code class="java">
* RegularStatement statement = insertInto("MyEntity").value("id",bindMarker()).value("name",bindMarker());
* batch.batchNativeStatement(statement,10,"John");
* </code></pre>
*
* @param regularStatement native CQL3 statement
* @param boundValues optional bound values
*/
public void batchNativeStatement(RegularStatement regularStatement, Object ... boundValues) {
this.batchNativeStatementWithCASListener(regularStatement, null, boundValues);
}
/**
*
* <pre class="code"><code class="java">
* CASResultListener listener = ...
* RegularStatement statement = insertInto("MyEntity").value("id",bindMarker()).value("name",bindMarker());
* batch.batchNativeStatementWithCASListener(statement,listener,10,"John");
* </code></pre>
*
* @param regularStatement native CQL3 statement
* @param casResultListener result listener for CAS operation
* @param boundValues optional bound values
*/
public void batchNativeStatementWithCASListener(RegularStatement regularStatement, CASResultListener casResultListener, Object... boundValues) {
validator.validateUpsertOrDelete(regularStatement);
final NativeStatementWrapper nativeStatementWrapper = new NativeStatementWrapper(NativeQueryLog.class, regularStatement, boundValues, Optional.fromNullable(casResultListener));
flushContext.pushStatement(nativeStatementWrapper);
}
@Override
protected PersistenceManagerOperations initPersistenceContext(Class<?> entityClass, Object primaryKey, Options options) {
log.trace("Initializing new persistence context for entity class {} and primary key {}",
entityClass.getCanonicalName(), primaryKey);
return contextFactory.newContextWithFlushContext(entityClass, primaryKey, options, flushContext).getPersistenceManagerFacade();
}
@Override
protected PersistenceManagerOperations initPersistenceContext(Object entity, Options options) {
log.trace("Initializing new persistence context for entity {}", entity);
return contextFactory.newContextWithFlushContext(entity, options, flushContext).getPersistenceManagerFacade();
}
private Options maybeAddTimestampToStatement(Options options) {
if (orderedBatch)
return options.duplicateWithNewTimestamp(UUIDGen.increasingMicroTimestamp());
else
return options;
}
}
|
#!/bin/bash
# Create ssh config for easy connection with mikr.us
# Autor: Radoslaw Karasinski
# Usage: you can pass following arguments:
# --mikrus MIKRUS_NAME (i.e. 'X123')
# --user USERNAME (i.e. 'root')
# --port PORT_NUMBER (to configure connection for non mikr.us host)
# --host HOSTNAME (to configure connection for non mikr.us host)
# username@test.com (without param in front)
# some bash magic: https://brianchildress.co/named-parameters-in-bash/
while [ $# -gt 0 ]; do
if [[ $1 == *"--"* ]]; then
param="${1/--/}"
declare "$param"="$2"
shift 1
else
if [[ $1 == *"@"* ]]; then
possible_ssh_param=$1
fi
fi
shift
done
if [[ -n "$mikrus" && -n "$possible_ssh_param" ]]; then
echo "ERROR: --mikrus and ssh-like argument ($possible_ssh_param) were given in the same time!"
exit 1
fi
if [[ -n "$host" && -n "$possible_ssh_param" ]]; then
echo "ERROR: --host and ssh-like argument ($possible_ssh_param) were given in the same time!"
exit 2
fi
port="${port:-22}"
user="${user:-root}"
if [ -n "$mikrus" ]; then
if ! [[ "$mikrus" =~ [a-q][0-9]{3}$ ]]; then
echo "ERROR: --mikrus parameter is not valid!"
exit 3
fi
port="$(( 10000 + $(echo $mikrus | grep -o '[0-9]\+') ))"
key="$(echo $mikrus | grep -o '[^0-9]\+' )"
declare -A hosts
hosts["a"]="srv03"
hosts["b"]="srv04"
hosts["e"]="srv07"
hosts["f"]="srv08"
hosts["g"]="srv09"
hosts["h"]="srv10"
hosts["q"]="mini01"
hosts["x"]="maluch"
host="${hosts[$key]}"
if [ -z "$host" ]; then
echo "ERROR: Server hostname not known for key '$key'."
exit 4
fi
host="$host.mikr.us"
fi
if [ -n "$possible_ssh_param" ]; then
user="${possible_ssh_param%%@*}"
host="${possible_ssh_param#*@}"
fi
if [ -z "$host" ]; then
echo "ERROR: Host was not recognized by any known method (--mikrus or --host or by specifying user@host.com)."
exit 5
fi
echo "Following params will be used to generate ssh config: user:'$user', host:'$host', port:'$port'"
read -n 1 -s -p "Press enter (or space) to continue or any other key to cancel." decision
echo ""
if [ -n "$decision" ]; then
echo "No further changes."
exit 0
fi
ssh_key_file="$HOME/.ssh/$user-$host-port-$port-rsa"
ssh-keygen -t rsa -b 4096 -f "$ssh_key_file" -C "$user@$host:$port"
header="$user-$host-$port"
touch ~/.ssh/config # just in case if file was not created in past
if ! grep -q "$header" ~/.ssh/config ; then
echo "" >> ~/.ssh/config
echo "Host $header" >> ~/.ssh/config
echo " HostName $host" >> ~/.ssh/config
echo " User $user" >> ~/.ssh/config
echo " Port $port" >> ~/.ssh/config
echo " IdentityFile $ssh_key_file" >> ~/.ssh/config
else
echo "ERROR: '$header' already defined in ~/.ssh/config!"
exit 6
fi
ssh-copy-id -i $ssh_key_file $header
echo ""
echo "ssh was properly configured!"
echo "Remmber, that you can use tab to use autofill to type connection string faster - type few first chars of Host (i.e. 'ssh ${header:0:8}', or even less) , then press tab."
|
#!/usr/bin/env bash
set -euo pipefail
# Get kind
test -f ~/bin/kind || \
curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64" \
&& chmod +x ./kind \
&& mv ./kind ~/bin
# Create a cluster
kind create cluster --config=config.yaml
# Apply the mandatory ingress-nginx components
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.30.0/deploy/static/mandatory.yaml
# Apply kind specific patches to forward the hostPorts to the ingress controller, set taint tolerations and schedule it to the custom labelled node.
kubectl patch deployments -n ingress-nginx nginx-ingress-controller -p '{"spec":{"template":{"spec":{"containers":[{"name":"nginx-ingress-controller","ports":[{"containerPort":80,"hostPort":80},{"containerPort":443,"hostPort":443}]}],"nodeSelector":{"ingress-ready":"true"},"tolerations":[{"key":"node-role.kubernetes.io/master","operator":"Equal","effect":"NoSchedule"}]}}}}'
# Expose the nginx service using NodePort.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.30.0/deploy/static/provider/baremetal/service-nodeport.yaml
# Test ingress
kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/usage.yaml && sleep 10
## should output "foo"
curl localhost/foo
## should output "bar"
curl localhost/bar
|
import requests
from bs4 import BeautifulSoup
import sqlite3
URL = 'https://www.huffpost.com'
# Request the data
html_data = requests.get(URL).text
# Parse the data
soup = BeautifulSoup(html_data, 'html.parser')
# Create a connection
conn = sqlite3.connect('news.db')
c = conn.cursor()
# Get all article links
articles = soup.find_all('article')
for article in articles:
a = article.find('a')
# check if a has href attr
if a and 'href' in a.attr:
# join the url with href
article_url = URL + a.attr['href']
# Get article data
html_data = requests.get(article_url).text
soup_article = BeautifulSoup(html_data, 'html.parser')
# Get title
title = soup_article.find('h1')
# Get the content
content = soup_article.find('div', {'class': 'entry__content'})
# Create a database entry
c.execute('INSERT INTO article (title, url, content) VALUES (?,?,?)',
(title.text, article_url, content.text))
# Save the changes
conn.commit()
# Close the connection
conn.close() |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/1024+0+512-shuffled-N-VB/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/1024+0+512-shuffled-N-VB/512+512+512-HPMI-256 --do_eval --per_device_eval_batch_size 1 --dataloader_drop_last --augmented --augmentation_function shuffle_within_sentences_high_pmi_first_third_sixth --eval_function last_sixth_eval |
#!/bin/bash
docker kill overflow
docker rm overflow
docker build -t tg17/overflow .
|
package com.crossover.mobiliza.app.data.remote.repository;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.core.util.Consumer;
import androidx.lifecycle.LiveData;
import com.crossover.mobiliza.app.AppExecutors;
import com.crossover.mobiliza.app.data.local.AppDatabase;
import com.crossover.mobiliza.app.data.local.dao.EventoDao;
import com.crossover.mobiliza.app.data.local.entity.Evento;
import com.crossover.mobiliza.app.data.local.entity.Ong;
import com.crossover.mobiliza.app.data.remote.NetworkBoundResource;
import com.crossover.mobiliza.app.data.remote.RateLimiter;
import com.crossover.mobiliza.app.data.remote.Resource;
import com.crossover.mobiliza.app.data.remote.service.AppServices;
import com.crossover.mobiliza.app.data.remote.service.EventoService;
import java.util.List;
import java.util.concurrent.TimeUnit;
import retrofit2.Call;
public class EventoRepository {
private static final String TAG = EventoRepository.class.getSimpleName();
private static final Object LOCK = new Object();
private static EventoRepository sInstance;
private final AppDatabase appDatabase;
private final AppServices appServices;
private final EventoDao eventoDao;
private final EventoService eventoService;
private RateLimiter<Long> rateLimiter;
public static EventoRepository getInstance(Context context) {
if (sInstance == null) {
synchronized (LOCK) {
Log.d(TAG, "Creating singleton instance");
sInstance = new EventoRepository(context.getApplicationContext());
}
}
return sInstance;
}
private EventoRepository(Context context) {
appDatabase = AppDatabase.getInstance(context);
eventoDao = appDatabase.eventoDao();
appServices = AppServices.getInstance(context);
eventoService = appServices.createService(EventoService.class);
rateLimiter = new RateLimiter<>(10, TimeUnit.SECONDS);
}
public void deletarEvento(Long idEvento, String googleIdToken, Consumer<Ong> onSuccess, Consumer<String> onFailure) {
AppExecutors.getInstance().network().execute(() -> {
Call<Ong> call = eventoService.deleteById(idEvento, googleIdToken);
AppServices.runCallAsync(call,
ong -> {
rateLimiter.shouldFetch(-1L);
rateLimiter.shouldFetch(idEvento);
onSuccess.accept(ong);
Log.i(TAG, "deleted evento: " + idEvento);
},
errorMsg -> {
onFailure.accept(errorMsg);
});
});
}
public void confirmarEvento(Long idEvento, String googleIdToken, boolean valor, Consumer<Evento> onSuccess, Consumer<String> onFailure) {
AppExecutors.getInstance().network().execute(() -> {
Call<Evento> call = eventoService.confirmar(idEvento, googleIdToken, valor);
AppServices.runCallAsync(call,
newEvento -> {
rateLimiter.shouldFetch(-1L);
rateLimiter.shouldFetch(idEvento);
onSuccess.accept(newEvento);
Log.i(TAG, "confirmed evento: " + newEvento.toString());
},
errorMsg -> {
onFailure.accept(errorMsg);
});
});
}
public LiveData<Resource<List<Evento>>> findAll() {
return new NetworkBoundResource<List<Evento>, List<Evento>>() {
@Override
protected void saveCallResult(List<Evento> item) {
if (item != null) {
eventoDao.deleteAll();
eventoDao.saveAll(item);
}
}
@NonNull
@Override
protected LiveData<List<Evento>> loadFromDb() {
return eventoDao.findAll();
}
@NonNull
@Override
protected Call<List<Evento>> createCall() {
return eventoService.findAll(null, null, null, null);
}
@Override
protected boolean shouldFetch() {
return rateLimiter.shouldFetch(-1L) || super.shouldFetch();
}
}.getAsLiveData();
}
public LiveData<Resource<List<Evento>>> findAllByOng(Long idOng) {
return new NetworkBoundResource<List<Evento>, List<Evento>>() {
@Override
protected void saveCallResult(List<Evento> item) {
if (item != null) {
eventoDao.saveAll(item);
}
}
@NonNull
@Override
protected LiveData<List<Evento>> loadFromDb() {
return eventoDao.findAllByOng(idOng);
}
@NonNull
@Override
protected Call<List<Evento>> createCall() {
return eventoService.findAll(idOng, null, null, null);
}
@Override
protected boolean shouldFetch() {
return rateLimiter.shouldFetch(-1L) || super.shouldFetch();
}
}.getAsLiveData();
}
public LiveData<Resource<List<Evento>>> findAllByFinalizado(Boolean finalizado) {
return new NetworkBoundResource<List<Evento>, List<Evento>>() {
@Override
protected void saveCallResult(List<Evento> item) {
if (item != null) {
eventoDao.saveAll(item);
}
}
@NonNull
@Override
protected LiveData<List<Evento>> loadFromDb() {
return finalizado ? eventoDao.findAllFinalizados() : eventoDao.findAllNotFinalizados();
}
@NonNull
@Override
protected Call<List<Evento>> createCall() {
return eventoService.findAll(null, null, null, finalizado);
}
@Override
protected boolean shouldFetch() {
return rateLimiter.shouldFetch(-1L) || super.shouldFetch();
}
}.getAsLiveData();
}
public LiveData<Resource<Evento>> findById(final long id) {
return new NetworkBoundResource<Evento, Evento>() {
@Override
protected void saveCallResult(Evento item) {
if (item != null)
eventoDao.save(item);
}
@NonNull
@Override
protected LiveData<Evento> loadFromDb() {
return eventoDao.findById(id);
}
@NonNull
@Override
protected Call<Evento> createCall() {
return eventoService.findById(id);
}
@Override
protected boolean shouldFetch() {
return rateLimiter.shouldFetch(id) || super.shouldFetch();
}
}.getAsLiveData();
}
public void save(final Evento evento, final String googleIdToken, final Consumer<Evento> onSuccess, final Consumer<String> onFailure) {
AppExecutors.getInstance().network().execute(() -> {
Call<Evento> call = eventoService.save(evento, googleIdToken);
AppServices.runCallAsync(call,
newEvento -> {
rateLimiter.shouldFetch(-1L);
rateLimiter.shouldFetch(evento.getId());
onSuccess.accept(newEvento);
Log.i(TAG, "saved evento: " + newEvento.toString());
},
errorMsg -> {
onFailure.accept(errorMsg);
});
});
}
}
|
<reponame>longshine/calibre-web<filename>src/main/java/lx/calibre/web/security/SecureUsernamePasswordAuthenticationFilter.java<gh_stars>1-10
package lx.calibre.web.security;
import javax.servlet.http.HttpServletRequest;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
public class SecureUsernamePasswordAuthenticationFilter extends UsernamePasswordAuthenticationFilter {
private KeyStore keyStore;
@Override
protected String obtainPassword(HttpServletRequest request) {
String password = request.getParameter(getPasswordParameter());
if (password != null && password.length() > 0 && keyStore != null) {
String secure = request.getParameter("secure");
if (Boolean.parseBoolean(secure)) {
try {
password = keyStore.decrypt(password);
} catch (Throwable t) {
password = null;
}
}
}
return password;
}
public void setKeyStore(KeyStore keyStore) {
this.keyStore = keyStore;
}
protected KeyStore getKeyStore() {
return this.keyStore;
}
}
|
#!/usr/bin/env bash
#
# Copyright (c) 2019-2020 The Mantle Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# This script runs all contrib/devtools/extended-lint-*.sh files, and fails if
# any exit with a non-zero status code.
# This script is intentionally locale dependent by not setting "export LC_ALL=C"
# in order to allow for the executed lint scripts to opt in or opt out of locale
# dependence themselves.
set -u
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
LINTALL=$(basename "${BASH_SOURCE[0]}")
for f in "${SCRIPTDIR}"/extended-lint-*.sh; do
if [ "$(basename "$f")" != "$LINTALL" ]; then
if ! "$f"; then
echo "^---- failure generated from $f"
exit 1
fi
fi
done
|
#The original version of this software may have been from 2016-2017 YL2 MEETconf by Lorenzo Brown.
#
#updated 13 May 2018 for Y2 summer, Ted Golfinopoulos
#Updated 3 June 2018 TG
#Last updated 12 May 2019 TG - added PYENV_ROOT environment variable, which got rid of pyenv-not-found errors in shell.
echo "Note: the Y1 sotware setup should be run first, as there are several co-dependencies"
echo "Update packages..."
sudo apt-get update -y
#Add repositories
sudo apt-add-repository -y ppa:rael-gc/scudcloud #slack
sudo add-apt-repository -y ppa:kdenlive/kdenlive-stable #kdenlive
sudo add-apt-repository --yes ppa:webupd8team/brackets #brackets text editor
sudo add-apt-repository -y ppa:inkscape.dev/stable #inkscape
sudo add-apt-repository -y ppa:chromium-daily/stable #chromium-browser
#!/bin/sh
sudo apt-get update -y
echo "...done"
echo "===Y2==="
#Note: Don't upgrade pip to Version 10 in Ubuntu 16.04, as of 13 May 2018, unless you want to sort out conflict between user-version of pip and system-wide version. Version 8.1 is okay
echo "Install software dependencies..."
#Install git
sudo apt-get -y install git
#Install pip and pip3 and dependencies
sudo apt-get -y install python-pip
sudo apt-get -y install python3-pip
sudo pip install -U setuptools
sudo pip3 install -U setuptools
#Install nodejs and npm
sudo apt-get -y install nodejs
sudo apt-get -y install npm
#install inkscape
#sudo apt-get update
sudo apt install inkscape -y
sudo apt-get -y install chromium-browser #Install Google Chrome
#Install curl
sudo apt-get -y install curl
#Install snap for installations
sudo apt-get -y install snap
#slack - team communication
sudo snap install slack --classic
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt update
sudo apt install scudcloud -y
#sudo apt remove scudcloud && sudo apt autoremove
#pencil
#wget “http://evoluspencil.googlecode.com/files/#evoluspencil_2.0.5_all.deb”
#sudo dpkg -i evoluspencil_2.0.5_all.deb
#sudo apt-get -y install pencil
wget http://pencil.evolus.vn/dl/V3.0.4/Pencil_3.0.4_amd64.deb
sudo dpkg -i Pencil_3.0.4_amd64.deb
sudo apt-get install -f
#kdenlive
#sudo apt-get update -
sudo apt-get -y install kdenlive -y
sudo apt install kdenlive -yk
sudo ppa-purge ppa:kdenlive/kdenlive-stable
#Install virtual environment
sudo apt-get -y install python-virtualenv
#Install list of requirements
echo "Installing Y2 Python dependencies..."
sudo pip install -r y2requirements.txt
sudo pip3 install -r y2requirements.txt
echo "...done installing y2 Python dependencies"
#Install Sublime text editor
#Install the GPG key
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
#Ensure apt is set up to work with https sources:
sudo apt-get -y install apt-transport-https
#Install stable version
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
#Update apt sources and install Sublime Text
###
#sudo apt-get update ###
###
sudo apt-get -y install sublime-text
#Install Brackets.io text editor - force "yes" response to all queries
###
#sudo apt-get update ###
###
sudo apt-get -y install brackets #Install brackets
###
#Install pyenv
###
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
#Install Microsoft vscode text editor (run with "code" command)
#Somehow, code is not in repository list - not sure what Ubuntu this is....
#Nor does the .gpg key get added - Had to do that manually with
#sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key>
#per instructions at https://chrisjean.com/fix-apt-get-update-the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-available/
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get -y install code
code --install-extension ms-python.python #Install python extension
echo "===Y2==="
echo "Download particular dependencies and copy to user directories"
#Download bootstrap with npm
cd ~ #Move to home directory
sudo npm install bootstrap@3
#Download and unzip postman
cd ~
wget -O postman.tar.gz https://dl.pstmn.io/download/latest/linux64
tar -xf postman.tar.gz #Suppress verbose output
rm postman.tar.gz #Remove postman zip file
#Download jQuery
cd ~
wget https://code.jquery.com/jquery-3.3.1.min.js
user_list=(student students testuser)
for this_user in ${user_list[*]}; do
this_dir="/home/$this_user"
sudo cp -r jquery-3.3.1.min.js $this_dir #jQuery
sudo cp -r node_modules $this_dir #Bootstrap
sudo cp -r Postman $this_dir #Postman
#Change ownership of files to local user
if [ $this_user == "student" ]
then
this_owner="students"
else
this_owner=$this_user
fi
sudo chown -R $this_owner $this_dir/jquery-3.3.1.min.js
sudo chown -R $this_owner $this_dir/node_modules
sudo chown -R $this_owner $this_dir/Postman
done
#Download ngrok and place in /usr/local/etc
cd ~
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
sudo mv ngrok /usr/local/etc
rm ngrok-stable-linux-amd64.zip #Remove zip file
#Copy lsc.sh to /usr/local/bin so it is in path
sudo cp lsc.sh /usr/local/bin
echo "Appending to .bashrc an alias of ngrok to point to /usr/local/etc/ngrok"
echo "Also, append commands to setup virtualenvwrapper"
user_list=(support student students testuser)
for this_user in ${user_list[*]}; do
this_dir="/home/$this_user"
this_file="$this_dir/.bashrc"
this_owner=$(stat -c "%U" $this_file)
#Modify permissions of .bashrc file so support can write into it
sudo chmod a+w $this_file
echo "#Alias ngrok to point to /usr/local/etc/ngrok" >> $this_file
echo "alias ngrok=\"/usr/local/etc/ngrok\"" >> $this_file
echo "" >> $this_file
#Set up virtualenvwrapper
echo "#Set up environment variables and source script containing virtualenvwrapper functions" >> $this_file
echo "export WORKON_HOME=$this_dir/.virtualenvs" >> $this_file
echo "export PROJECT_HOME=$this_dir/Devel" >> $this_file
echo "source /usr/local/bin/virtualenvwrapper.sh" >> $this_file
#Remove newly-added permissions allowing all users to write into .bashrc file
sudo chmod a-w $this_file
sudo chmod u+w $this_file #Allow user to edit own .bashrc
echo "...done editing $this_file file"
#Add to .bashrc file for pyenv
echo 'export PYENV_ROOT=$HOME/.pyenv' >> $this_file
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> $this_file #Add pyenv executable to path
echo 'if command -v pyenv 1>/dev/null 2>&1;' >> $this_file
echo 'then' >> $this_file
echo ' eval "$(pyenv init -)"' >> $this_file
echo 'fi' >> $this_file
echo 'eval "$(pyenv virtualenv-init -)"' >> $this_file
#Create alias from lsc to lsc.sh
echo "#Alias lsc.sh, which adds a comma after each line of ls" >> $this_file
echo "alias lsc=\"/usr/local/bin/lsc.sh\"" >> $this_file
bash this_file
pyenv update
done
echo "================================"
echo "Y2 setup done"
|
<filename>Vulcan.Core.Auth.Database/Tables/ApiClientOrigins.sql
CREATE TABLE [auth].[ApiClientOrigins]
(
[Id] INT NOT NULL identity(100000,1),
[ApiClientId] int not null,
[Origin] nvarchar(2048) not null,
[CreatedDate] as getdate(),
[CreatedByUserId] int null,
[CreatedByClientId] int null,
[UpdatedByUserId] int null,
[UpdatedByClientId] int null,
[UpdatedDate] datetime null,
[IsDeleted] bit not null default(0),
constraint PK_ApiClientOrigins_ID primary key ([Id]),
constraint FK_ApiClientOrigins_ClientId foreign key ([ApiClientId]) references [auth].[ApiClients]([Id]),
constraint FK_ApiClientOrigins_CreatedByClientId foreign key ([CreatedByClientId]) references [auth].[ApiClients]([Id]),
constraint FK_ApiClientOrigins_CreatedByUserId foreign key ([CreatedByUserId]) references [auth].[ApiUsers]([Id]),
constraint FK_ApiClientOrigins_UpdatedByClientId foreign key ([UpdatedByClientId]) references [auth].[ApiClients]([Id]),
constraint FK_ApiClientOrigins_UpdatedByUserId foreign key ([UpdatedByUserId]) references [auth].[ApiUsers]([Id])
)
|
use robinhood::Client;
fn fetch_stock_price(symbol: &str) -> Result<f64, String> {
// Initialize the Robinhood client
let client = Client::new();
// Make a request to fetch the current price of the given stock symbol
match client.get_stock_quote(symbol) {
Ok(quote) => Ok(quote.last_trade_price.parse().unwrap()),
Err(err) => Err(format!("Failed to fetch stock price: {}", err)),
}
}
fn main() {
match fetch_stock_price("AAPL") {
Ok(price) => println!("Current price of AAPL: ${}", price),
Err(err) => eprintln!("{}", err),
}
} |
#!/bin/bash
##############################################################################
# Name: getopts.sh
#
# Summary: Demo using getopts to parse command line arguments.
# For more info:
# $ help getopts
#
# Adapted: Tue 06 Mar 2001 08:21:55 (Bob Heckel -- from
# http://www.oase-shareware.org/shell/goodcoding/cmdargs.html)
# Modified: Tue 08 Aug 2006 12:20:41 (Bob Heckel)
##############################################################################
# Simple. Detect -c switch:
while getopts c opt; do
shift `expr $OPTIND - 1`
case "$opt" in
c ) cp -v lelimssumres01a$1.sas7bdat /cygdrive/x/SQL_Loader/lelimssumres01a.sas7bdat && \
cp -v lelimsindres01a$1.sas7bdat /cygdrive/x/SQL_Loader/lelimsindres01a.sas7bdat
exit 0
;;
esac
done
echo "Number of parameters passed to this pgm, i.e. \$#, is: $#"
# No switches passed. Numeric comparison so use -lt or -eq instead of < or =
if [ $# -lt 1 ]; then
echo 'This program does nothing. '
echo 'Must pass at least one switch.'
echo " E.g. $0 -v"
echo ' or'
echo " E.g. $0 -f fooparam"
echo 'Exiting.'
exit 1
fi
VFLAG=off
FILENAME=undefined
# This loop runs once for each switch or filename. If a letter is followed by
# a colon, the option is expected to have an argument.
while getopts vVf:F: the_opt; do
echo "OPTARG ($OPTARG) is non-null when a colon follows the string. "
echo 'E.g. f:F:'
case "$the_opt" in
v | V ) VFLAG=on;;
f ) FILENAME="$OPTARG";;
\? ) # Unknown flag, can also use * )
echo >&2 \
"Usage: $0 [-v] [-f filename]"
exit 1
;;
esac
done
echo "OPTIND is $OPTIND"
# Move argument pointer to next. I think I need to do this when getopts is
# used in .bashrc...
shift `expr $OPTIND - 1` # same as shift $(($OPTIND - 1))
# ...or maybe better
# unset OPTIND
echo "now OPTIND is still $OPTIND"
echo "Summary: \$VFLAG is: $VFLAG, parameter passed is: $FILENAME"
|
#!/usr/bin/env bash
go mod download
package="./IdParser.go"
package_split=(${package//\// })
package_name="IdParser"
platforms=("windows/amd64" "windows/386" "linux/amd64" "linux/386" "linux/arm64" "linux/arm")
for platform in "${platforms[@]}"
do
platform_split=(${platform//\// })
GOOS=${platform_split[0]}
GOARCH=${platform_split[1]}
output_name=$package_name'-'$GOOS'-'$GOARCH
if [ "$GOOS" = "windows" ]; then
output_name+='.exe'
fi
env GOOS="$GOOS" GOARCH=$GOARCH go build -o "./build/$output_name" $package
if [ $? -ne 0 ]; then
echo 'An error has occurred! Aborting the script execution...'
exit 1
fi
done |
package com.threathunter.bordercollie.slot.compute.graph.node;
import com.threathunter.bordercollie.slot.compute.VariableDataContext;
import com.threathunter.bordercollie.slot.util.LogUtil;
import com.threathunter.model.Event;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
*/
public class EventVariableNode extends VariableNode {
Logger logger = LoggerFactory.getLogger(EventVariableNode.class);
@Override
public boolean compute(final VariableDataContext holder) {
return true;
}
public VariableDataContext computeEvent(final Event event) {
VariableDataContext context = new VariableDataContext();
event.getPropertyValues().forEach((property, value) ->
context.addContextValue(this.getIdentifier(), property, value));
context.addContextValue(this.getIdentifier(), "app", event.getApp());
context.addContextValue(this.getIdentifier(), "name", event.getName());
context.addContextValue(this.getIdentifier(), "key", event.getKey());
context.addContextValue(this.getIdentifier(), "timestamp", event.getTimestamp());
context.addContextValue(this.getIdentifier(), "value", event.value());
context.addContextValue("level", 1);
LogUtil.print(context, logger);
return context;
}
}
|
import json
def parseOpenCMProperties(jsonString):
data = json.loads(jsonString)
parsed_data = {
"host": data["Transport"]["Host"],
"port": data["Transport"]["Port"],
"user": data["Auth"]["User"],
"extended_properties": [{"name": prop["@name"], "value": prop["$"]} for prop in data["ExtendedProperties"]["Property"]]
}
return parsed_data |
<reponame>Gdudek-git/multithreading-example
package utils;
public class GetResourcePath {
public static String getResourcePath(String path)
{
return GetResourcePath.class.getResource(path).toString();
}
}
|
#!/bin/bash
nohup ./train.sh > nohup.log 2>&1 &
echo nohup job created!
|
<reponame>randoum/geocoder
# frozen_string_literal: true
require 'geocoder/results/base'
module Geocoder
module Result
class Mapquest < Base
def coordinates
%w[lat lng].map { |l| @data['latLng'][l] }
end
def city
@data['adminArea5']
end
def street
@data['street']
end
def state
@data['adminArea3']
end
def county
@data['adminArea4']
end
alias state_code state
# FIXME: these might not be right, unclear with MQ documentation
alias province state
alias province_code state
def postal_code
@data['postalCode'].to_s
end
def country
@data['adminArea1']
end
def country_code
country
end
def address
[street, city, state, postal_code, country].reject { |s| s.length.zero? }.join(', ')
end
end
end
end
|
<gh_stars>0
//MODELS - quotes.js
//'use strict'
//const request = require('request')
//const quoteCtrl = require('../controllers/quotes');
//module.exports.apiCall = symbol => {
//Stock Quote API markit on demand
//const URL = `http://dev.markitondemand.com/MODApis/Api/v2/Quote/json?symbol=${symbol}`;
//return request.get(URL, (err, response, body) => {
//if (err) throw err;
//console.log('body before ', body);
//body = JSON.parse(body);
//console.log('json parse body ', body);
//const returnQuote = {
//Name: body.Name,
//LastPrice: body.LastPrice,
//Change: body.Change
//}
//console.log('quote return ', returnQuote);
//return returnQuote;
//});
//};
|
from flask import Flask, request
import spacy
nlp = spacy.load("en_core_web_sm")
app = Flask(__name__)
@app.route("/subject-verb-extraction", methods = ["POST"])
def extract_subject_verb():
if request.method == "POST":
data = request.json
sentence = data["sentence"]e
doc = nlp(sentence)
subtokens = [token.text for token in doc if (token.dep_ == "nsubj" or token.dep_ == "ROOT")]
verb_pattern = " ".join(subtokens)
return verb_pattern
if __name__ == "__main__":
app.run() |
# include <sys/select.h>
# include <vector>
class FDSet {
private:
fd_set set;
public:
FDSet() {
FD_ZERO(&set);
}
void addFileDescriptor(int fd) {
FD_SET(fd, &set);
}
void removeFileDescriptor(int fd) {
FD_CLR(fd, &set);
}
fd_set* getSet() {
return &set;
}
};
class ISelect {
private:
FDSet fdSet;
public:
void addFileDescriptor(int fd) {
fdSet.addFileDescriptor(fd);
}
void removeFileDescriptor(int fd) {
fdSet.removeFileDescriptor(fd);
}
int waitForActivity() {
fd_set* set = fdSet.getSet();
int maxfd = -1; // Initialize maxfd to -1
for (int fd = 0; fd < FD_SETSIZE; ++fd) {
if (FD_ISSET(fd, set)) {
if (fd > maxfd) {
maxfd = fd;
}
}
}
if (maxfd == -1) {
return 0; // No file descriptors are set
}
struct timeval timeout;
timeout.tv_sec = 0;
timeout.tv_usec = 0;
int ready = select(maxfd + 1, set, NULL, NULL, &timeout);
return ready;
}
}; |
<reponame>drawsta/spring-boot-example
package xyz.zkyq;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import javax.sql.DataSource;
/**
* @author zkyq
* @date 1/5/20
*/
@SpringBootTest
public class DataSourceTests {
@Autowired
private DataSource dataSource;
/**
* 查看数据源.
*
* 默认数据源: class com.zaxxer.hikari.HikariDataSource
* 配置spring.datasource.type为com.alibaba.druid.pool.DruidDataSource后,数据源:class com.alibaba.druid.pool.DruidDataSource
*/
@Test
public void contextLoads() {
System.out.println("数据源:" + dataSource.getClass());
}
}
|
<reponame>ianemcallister/shopify-crm<filename>server/cli/getSquareCustomers.js
/*
*
*/
// DEFEIN DEPENDENCIES
const Square = require('../square/stdops.js');
const fs = require('fs');
const path = require('path');
async function GetCustomerList() {
var filename = 'squareCustomers.json';
var customerList = await Square.customers.list();
console.log(customerList);
console.log('found ', customerList.length, " customers");
//var jsonList = JSON.stringify(customerList);
//fs.writeFileSync(filename, jsonList, "utf8");
}
GetCustomerList();
|
package kata.java;
public class BTreeSet {
private final int pageLength;
private Page root;
private int height;
public BTreeSet(int pageLength) {
this.pageLength = pageLength;
this.root = new Page(this.pageLength);
this.height = 1;
}
public boolean contains(int key) {
return contains(root, key, height);
}
private boolean contains(Page page, int key, int height) {
if (height == 1) {
for (Entry e : page.keys) {
if (e != null && e.key == key) return true;
}
return false;
}
else {
for (int i = 1; i < pageLength; i++) {
if (page.keys[i-1] != null && (page.keys[i] == null || key < page.keys[i].key))
return contains(page.keys[i-1].next, key, height - 1);
}
return false;
}
}
public void add(int key) {
if (root.add(key, height)) {
height += 1;
}
}
public int height() {
return height;
}
private class Page {
private Entry[] keys;
private int size;
private Page(int pageLength) {
keys = new Entry[pageLength];
size = 0;
}
private boolean add(int key, int height) {
if (height == 1) {
if (size < pageLength) {
keys[size] = new Entry(key);
size += 1;
return false;
}
else {
split(key);
return true;
}
}
else {
for (int i = 1; i < pageLength; i++) {
if (keys[i-1] != null && (keys[i] == null || key < keys[i].key)) {
return keys[i - 1].next.add(key, height - 1);
}
}
return false;
}
}
private void split(int key) {
Page left = new Page(pageLength);
Page right = new Page(pageLength);
int leftLength = pageLength / 2 + 1;
fillPage(left, 0, leftLength);
fillPage(right, leftLength, pageLength);
right.add(key, 1);
balance(left, right);
}
private void balance(BTreeSet.Page left, BTreeSet.Page right) {
keys[0].key = left.keys[0].key;
keys[0].next = left;
keys[1].key = right.keys[0].key;
keys[1].next = right;
cleanUp();
}
private void cleanUp() {
size = 2;
for (int i = 2; i < pageLength; i++) {
keys[i] = null;
}
}
private void fillPage(Page page, int from, int length) {
for (int i = from; i < length; i++) {
page.add(keys[i].key, 1);
}
}
}
private class Entry {
private int key;
private Page next;
public Entry(int key) {
this.key = key;
}
}
}
|
// Code generated by protoc-gen-gogo.
// source: types.proto
// DO NOT EDIT!
/*
Package api is a generated protocol buffer package.
It is generated from these files:
types.proto
specs.proto
objects.proto
control.proto
dispatcher.proto
ca.proto
snapshot.proto
raft.proto
health.proto
resource.proto
logbroker.proto
watch.proto
It has these top-level messages:
Version
IndexEntry
Annotations
Resources
ResourceRequirements
Platform
PluginDescription
EngineDescription
NodeDescription
NodeTLSInfo
RaftMemberStatus
NodeStatus
Image
Mount
RestartPolicy
UpdateConfig
UpdateStatus
ContainerStatus
PortStatus
TaskStatus
NetworkAttachmentConfig
IPAMConfig
PortConfig
Driver
IPAMOptions
Peer
WeightedPeer
IssuanceStatus
AcceptancePolicy
ExternalCA
CAConfig
OrchestrationConfig
TaskDefaults
DispatcherConfig
RaftConfig
EncryptionConfig
SpreadOver
PlacementPreference
Placement
JoinTokens
RootCA
Certificate
EncryptionKey
ManagerStatus
FileTarget
SecretReference
ConfigReference
BlacklistedCertificate
HealthConfig
MaybeEncryptedRecord
RootRotation
Privileges
NodeSpec
ServiceSpec
ReplicatedService
GlobalService
TaskSpec
GenericRuntimeSpec
NetworkAttachmentSpec
ContainerSpec
EndpointSpec
NetworkSpec
ClusterSpec
SecretSpec
ConfigSpec
Meta
Node
Service
Endpoint
Task
NetworkAttachment
Network
Cluster
Secret
Config
Resource
Extension
GetNodeRequest
GetNodeResponse
ListNodesRequest
ListNodesResponse
UpdateNodeRequest
UpdateNodeResponse
RemoveNodeRequest
RemoveNodeResponse
GetTaskRequest
GetTaskResponse
RemoveTaskRequest
RemoveTaskResponse
ListTasksRequest
ListTasksResponse
CreateServiceRequest
CreateServiceResponse
GetServiceRequest
GetServiceResponse
UpdateServiceRequest
UpdateServiceResponse
RemoveServiceRequest
RemoveServiceResponse
ListServicesRequest
ListServicesResponse
CreateNetworkRequest
CreateNetworkResponse
GetNetworkRequest
GetNetworkResponse
RemoveNetworkRequest
RemoveNetworkResponse
ListNetworksRequest
ListNetworksResponse
GetClusterRequest
GetClusterResponse
ListClustersRequest
ListClustersResponse
KeyRotation
UpdateClusterRequest
UpdateClusterResponse
GetSecretRequest
GetSecretResponse
UpdateSecretRequest
UpdateSecretResponse
ListSecretsRequest
ListSecretsResponse
CreateSecretRequest
CreateSecretResponse
RemoveSecretRequest
RemoveSecretResponse
GetConfigRequest
GetConfigResponse
UpdateConfigRequest
UpdateConfigResponse
ListConfigsRequest
ListConfigsResponse
CreateConfigRequest
CreateConfigResponse
RemoveConfigRequest
RemoveConfigResponse
SessionRequest
SessionMessage
HeartbeatRequest
HeartbeatResponse
UpdateTaskStatusRequest
UpdateTaskStatusResponse
TasksRequest
TasksMessage
AssignmentsRequest
Assignment
AssignmentChange
AssignmentsMessage
NodeCertificateStatusRequest
NodeCertificateStatusResponse
IssueNodeCertificateRequest
IssueNodeCertificateResponse
GetRootCACertificateRequest
GetRootCACertificateResponse
GetUnlockKeyRequest
GetUnlockKeyResponse
StoreSnapshot
ClusterSnapshot
Snapshot
RaftMember
JoinRequest
JoinResponse
LeaveRequest
LeaveResponse
ProcessRaftMessageRequest
ProcessRaftMessageResponse
ResolveAddressRequest
ResolveAddressResponse
InternalRaftRequest
StoreAction
HealthCheckRequest
HealthCheckResponse
AttachNetworkRequest
AttachNetworkResponse
DetachNetworkRequest
DetachNetworkResponse
LogSubscriptionOptions
LogSelector
LogContext
LogAttr
LogMessage
SubscribeLogsRequest
SubscribeLogsMessage
ListenSubscriptionsRequest
SubscriptionMessage
PublishLogsMessage
PublishLogsResponse
Object
SelectBySlot
SelectByCustom
SelectBy
WatchRequest
WatchMessage
*/
package api
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/gogo/protobuf/types"
import google_protobuf1 "github.com/gogo/protobuf/types"
import _ "github.com/gogo/protobuf/gogoproto"
import os "os"
import time "time"
import github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
import strings "strings"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// TaskState enumerates the states that a task progresses through within an
// agent. States are designed to be monotonically increasing, such that if two
// states are seen by a task, the greater of the new represents the true state.
type TaskState int32
const (
TaskStateNew TaskState = 0
TaskStatePending TaskState = 64
TaskStateAssigned TaskState = 192
TaskStateAccepted TaskState = 256
TaskStatePreparing TaskState = 320
TaskStateReady TaskState = 384
TaskStateStarting TaskState = 448
TaskStateRunning TaskState = 512
TaskStateCompleted TaskState = 576
TaskStateShutdown TaskState = 640
TaskStateFailed TaskState = 704
TaskStateRejected TaskState = 768
TaskStateOrphaned TaskState = 832
)
var TaskState_name = map[int32]string{
0: "NEW",
64: "PENDING",
192: "ASSIGNED",
256: "ACCEPTED",
320: "PREPARING",
384: "READY",
448: "STARTING",
512: "RUNNING",
576: "COMPLETE",
640: "SHUTDOWN",
704: "FAILED",
768: "REJECTED",
832: "ORPHANED",
}
var TaskState_value = map[string]int32{
"NEW": 0,
"PENDING": 64,
"ASSIGNED": 192,
"ACCEPTED": 256,
"PREPARING": 320,
"READY": 384,
"STARTING": 448,
"RUNNING": 512,
"COMPLETE": 576,
"SHUTDOWN": 640,
"FAILED": 704,
"REJECTED": 768,
"ORPHANED": 832,
}
func (x TaskState) String() string {
return proto.EnumName(TaskState_name, int32(x))
}
func (TaskState) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} }
type NodeRole int32
const (
NodeRoleWorker NodeRole = 0
NodeRoleManager NodeRole = 1
)
var NodeRole_name = map[int32]string{
0: "WORKER",
1: "MANAGER",
}
var NodeRole_value = map[string]int32{
"WORKER": 0,
"MANAGER": 1,
}
func (x NodeRole) String() string {
return proto.EnumName(NodeRole_name, int32(x))
}
func (NodeRole) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} }
type RaftMemberStatus_Reachability int32
const (
// Unknown indicates that the manager state cannot be resolved
RaftMemberStatus_UNKNOWN RaftMemberStatus_Reachability = 0
// Unreachable indicates that the node cannot be contacted by other
// raft cluster members.
RaftMemberStatus_UNREACHABLE RaftMemberStatus_Reachability = 1
// Reachable indicates that the node is healthy and reachable
// by other members.
RaftMemberStatus_REACHABLE RaftMemberStatus_Reachability = 2
)
var RaftMemberStatus_Reachability_name = map[int32]string{
0: "UNKNOWN",
1: "UNREACHABLE",
2: "REACHABLE",
}
var RaftMemberStatus_Reachability_value = map[string]int32{
"UNKNOWN": 0,
"UNREACHABLE": 1,
"REACHABLE": 2,
}
func (x RaftMemberStatus_Reachability) String() string {
return proto.EnumName(RaftMemberStatus_Reachability_name, int32(x))
}
func (RaftMemberStatus_Reachability) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{10, 0}
}
// TODO(aluzzardi) These should be using `gogoproto.enumvalue_customname`.
type NodeStatus_State int32
const (
// Unknown indicates the node state cannot be resolved.
NodeStatus_UNKNOWN NodeStatus_State = 0
// Down indicates the node is down.
NodeStatus_DOWN NodeStatus_State = 1
// Ready indicates the node is ready to accept tasks.
NodeStatus_READY NodeStatus_State = 2
// Disconnected indicates the node is currently trying to find new manager.
NodeStatus_DISCONNECTED NodeStatus_State = 3
)
var NodeStatus_State_name = map[int32]string{
0: "UNKNOWN",
1: "DOWN",
2: "READY",
3: "DISCONNECTED",
}
var NodeStatus_State_value = map[string]int32{
"UNKNOWN": 0,
"DOWN": 1,
"READY": 2,
"DISCONNECTED": 3,
}
func (x NodeStatus_State) String() string {
return proto.EnumName(NodeStatus_State_name, int32(x))
}
func (NodeStatus_State) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{11, 0} }
type Mount_MountType int32
const (
MountTypeBind Mount_MountType = 0
MountTypeVolume Mount_MountType = 1
MountTypeTmpfs Mount_MountType = 2
)
var Mount_MountType_name = map[int32]string{
0: "BIND",
1: "VOLUME",
2: "TMPFS",
}
var Mount_MountType_value = map[string]int32{
"BIND": 0,
"VOLUME": 1,
"TMPFS": 2,
}
func (x Mount_MountType) String() string {
return proto.EnumName(Mount_MountType_name, int32(x))
}
func (Mount_MountType) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{13, 0} }
type Mount_BindOptions_MountPropagation int32
const (
MountPropagationRPrivate Mount_BindOptions_MountPropagation = 0
MountPropagationPrivate Mount_BindOptions_MountPropagation = 1
MountPropagationRShared Mount_BindOptions_MountPropagation = 2
MountPropagationShared Mount_BindOptions_MountPropagation = 3
MountPropagationRSlave Mount_BindOptions_MountPropagation = 4
MountPropagationSlave Mount_BindOptions_MountPropagation = 5
)
var Mount_BindOptions_MountPropagation_name = map[int32]string{
0: "RPRIVATE",
1: "PRIVATE",
2: "RSHARED",
3: "SHARED",
4: "RSLAVE",
5: "SLAVE",
}
var Mount_BindOptions_MountPropagation_value = map[string]int32{
"RPRIVATE": 0,
"PRIVATE": 1,
"RSHARED": 2,
"SHARED": 3,
"RSLAVE": 4,
"SLAVE": 5,
}
func (x Mount_BindOptions_MountPropagation) String() string {
return proto.EnumName(Mount_BindOptions_MountPropagation_name, int32(x))
}
func (Mount_BindOptions_MountPropagation) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{13, 0, 0}
}
type RestartPolicy_RestartCondition int32
const (
RestartOnNone RestartPolicy_RestartCondition = 0
RestartOnFailure RestartPolicy_RestartCondition = 1
RestartOnAny RestartPolicy_RestartCondition = 2
)
var RestartPolicy_RestartCondition_name = map[int32]string{
0: "NONE",
1: "ON_FAILURE",
2: "ANY",
}
var RestartPolicy_RestartCondition_value = map[string]int32{
"NONE": 0,
"ON_FAILURE": 1,
"ANY": 2,
}
func (x RestartPolicy_RestartCondition) String() string {
return proto.EnumName(RestartPolicy_RestartCondition_name, int32(x))
}
func (RestartPolicy_RestartCondition) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{14, 0}
}
type UpdateConfig_FailureAction int32
const (
UpdateConfig_PAUSE UpdateConfig_FailureAction = 0
UpdateConfig_CONTINUE UpdateConfig_FailureAction = 1
UpdateConfig_ROLLBACK UpdateConfig_FailureAction = 2
)
var UpdateConfig_FailureAction_name = map[int32]string{
0: "PAUSE",
1: "CONTINUE",
2: "ROLLBACK",
}
var UpdateConfig_FailureAction_value = map[string]int32{
"PAUSE": 0,
"CONTINUE": 1,
"ROLLBACK": 2,
}
func (x UpdateConfig_FailureAction) String() string {
return proto.EnumName(UpdateConfig_FailureAction_name, int32(x))
}
func (UpdateConfig_FailureAction) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{15, 0}
}
// UpdateOrder controls the order of operations when rolling out an
// updated task. Either the old task is shut down before the new task
// is started, or the new task is started before the old task is shut
// down.
type UpdateConfig_UpdateOrder int32
const (
UpdateConfig_STOP_FIRST UpdateConfig_UpdateOrder = 0
UpdateConfig_START_FIRST UpdateConfig_UpdateOrder = 1
)
var UpdateConfig_UpdateOrder_name = map[int32]string{
0: "STOP_FIRST",
1: "START_FIRST",
}
var UpdateConfig_UpdateOrder_value = map[string]int32{
"STOP_FIRST": 0,
"START_FIRST": 1,
}
func (x UpdateConfig_UpdateOrder) String() string {
return proto.EnumName(UpdateConfig_UpdateOrder_name, int32(x))
}
func (UpdateConfig_UpdateOrder) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{15, 1}
}
type UpdateStatus_UpdateState int32
const (
UpdateStatus_UNKNOWN UpdateStatus_UpdateState = 0
UpdateStatus_UPDATING UpdateStatus_UpdateState = 1
UpdateStatus_PAUSED UpdateStatus_UpdateState = 2
UpdateStatus_COMPLETED UpdateStatus_UpdateState = 3
UpdateStatus_ROLLBACK_STARTED UpdateStatus_UpdateState = 4
UpdateStatus_ROLLBACK_PAUSED UpdateStatus_UpdateState = 5
UpdateStatus_ROLLBACK_COMPLETED UpdateStatus_UpdateState = 6
)
var UpdateStatus_UpdateState_name = map[int32]string{
0: "UNKNOWN",
1: "UPDATING",
2: "PAUSED",
3: "COMPLETED",
4: "ROLLBACK_STARTED",
5: "ROLLBACK_PAUSED",
6: "ROLLBACK_COMPLETED",
}
var UpdateStatus_UpdateState_value = map[string]int32{
"UNKNOWN": 0,
"UPDATING": 1,
"PAUSED": 2,
"COMPLETED": 3,
"ROLLBACK_STARTED": 4,
"ROLLBACK_PAUSED": 5,
"ROLLBACK_COMPLETED": 6,
}
func (x UpdateStatus_UpdateState) String() string {
return proto.EnumName(UpdateStatus_UpdateState_name, int32(x))
}
func (UpdateStatus_UpdateState) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{16, 0}
}
// AddressFamily specifies the network address family that
// this IPAMConfig belongs to.
type IPAMConfig_AddressFamily int32
const (
IPAMConfig_UNKNOWN IPAMConfig_AddressFamily = 0
IPAMConfig_IPV4 IPAMConfig_AddressFamily = 4
IPAMConfig_IPV6 IPAMConfig_AddressFamily = 6
)
var IPAMConfig_AddressFamily_name = map[int32]string{
0: "UNKNOWN",
4: "IPV4",
6: "IPV6",
}
var IPAMConfig_AddressFamily_value = map[string]int32{
"UNKNOWN": 0,
"IPV4": 4,
"IPV6": 6,
}
func (x IPAMConfig_AddressFamily) String() string {
return proto.EnumName(IPAMConfig_AddressFamily_name, int32(x))
}
func (IPAMConfig_AddressFamily) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{21, 0}
}
type PortConfig_Protocol int32
const (
ProtocolTCP PortConfig_Protocol = 0
ProtocolUDP PortConfig_Protocol = 1
)
var PortConfig_Protocol_name = map[int32]string{
0: "TCP",
1: "UDP",
}
var PortConfig_Protocol_value = map[string]int32{
"TCP": 0,
"UDP": 1,
}
func (x PortConfig_Protocol) String() string {
return proto.EnumName(PortConfig_Protocol_name, int32(x))
}
func (PortConfig_Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{22, 0} }
// PublishMode controls how ports are published on the swarm.
type PortConfig_PublishMode int32
const (
// PublishModeIngress exposes the port across the cluster on all nodes.
PublishModeIngress PortConfig_PublishMode = 0
// PublishModeHost exposes the port on just the target host. If the
// published port is undefined, an ephemeral port will be allocated. If
// the published port is defined, the node will attempt to allocate it,
// erroring the task if it fails.
PublishModeHost PortConfig_PublishMode = 1
)
var PortConfig_PublishMode_name = map[int32]string{
0: "INGRESS",
1: "HOST",
}
var PortConfig_PublishMode_value = map[string]int32{
"INGRESS": 0,
"HOST": 1,
}
func (x PortConfig_PublishMode) String() string {
return proto.EnumName(PortConfig_PublishMode_name, int32(x))
}
func (PortConfig_PublishMode) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{22, 1}
}
type IssuanceStatus_State int32
const (
IssuanceStateUnknown IssuanceStatus_State = 0
// A new certificate should be issued
IssuanceStateRenew IssuanceStatus_State = 1
// Certificate is pending acceptance
IssuanceStatePending IssuanceStatus_State = 2
// successful completion certificate issuance
IssuanceStateIssued IssuanceStatus_State = 3
// Certificate issuance failed
IssuanceStateFailed IssuanceStatus_State = 4
// Signals workers to renew their certificate. From the CA's perspective
// this is equivalent to IssuanceStateIssued: a noop.
IssuanceStateRotate IssuanceStatus_State = 5
)
var IssuanceStatus_State_name = map[int32]string{
0: "UNKNOWN",
1: "RENEW",
2: "PENDING",
3: "ISSUED",
4: "FAILED",
5: "ROTATE",
}
var IssuanceStatus_State_value = map[string]int32{
"UNKNOWN": 0,
"RENEW": 1,
"PENDING": 2,
"ISSUED": 3,
"FAILED": 4,
"ROTATE": 5,
}
func (x IssuanceStatus_State) String() string {
return proto.EnumName(IssuanceStatus_State_name, int32(x))
}
func (IssuanceStatus_State) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{27, 0} }
type ExternalCA_CAProtocol int32
const (
ExternalCA_CAProtocolCFSSL ExternalCA_CAProtocol = 0
)
var ExternalCA_CAProtocol_name = map[int32]string{
0: "CFSSL",
}
var ExternalCA_CAProtocol_value = map[string]int32{
"CFSSL": 0,
}
func (x ExternalCA_CAProtocol) String() string {
return proto.EnumName(ExternalCA_CAProtocol_name, int32(x))
}
func (ExternalCA_CAProtocol) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{29, 0}
}
// Encryption algorithm that can implemented using this key
type EncryptionKey_Algorithm int32
const (
AES_128_GCM EncryptionKey_Algorithm = 0
)
var EncryptionKey_Algorithm_name = map[int32]string{
0: "AES_128_GCM",
}
var EncryptionKey_Algorithm_value = map[string]int32{
"AES_128_GCM": 0,
}
func (x EncryptionKey_Algorithm) String() string {
return proto.EnumName(EncryptionKey_Algorithm_name, int32(x))
}
func (EncryptionKey_Algorithm) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{42, 0}
}
type MaybeEncryptedRecord_Algorithm int32
const (
MaybeEncryptedRecord_NotEncrypted MaybeEncryptedRecord_Algorithm = 0
MaybeEncryptedRecord_NACLSecretboxSalsa20Poly1305 MaybeEncryptedRecord_Algorithm = 1
)
var MaybeEncryptedRecord_Algorithm_name = map[int32]string{
0: "NONE",
1: "SECRETBOX_SALSA20_POLY1305",
}
var MaybeEncryptedRecord_Algorithm_value = map[string]int32{
"NONE": 0,
"SECRETBOX_SALSA20_POLY1305": 1,
}
func (x MaybeEncryptedRecord_Algorithm) String() string {
return proto.EnumName(MaybeEncryptedRecord_Algorithm_name, int32(x))
}
func (MaybeEncryptedRecord_Algorithm) EnumDescriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{49, 0}
}
// Version tracks the last time an object in the store was updated.
type Version struct {
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
}
func (m *Version) Reset() { *m = Version{} }
func (*Version) ProtoMessage() {}
func (*Version) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} }
type IndexEntry struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Val string `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"`
}
func (m *IndexEntry) Reset() { *m = IndexEntry{} }
func (*IndexEntry) ProtoMessage() {}
func (*IndexEntry) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} }
// Annotations provide useful information to identify API objects. They are
// common to all API specs.
type Annotations struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Indices provides keys and values for indexing this object.
// A single key may have multiple values.
Indices []IndexEntry `protobuf:"bytes,4,rep,name=indices" json:"indices"`
}
func (m *Annotations) Reset() { *m = Annotations{} }
func (*Annotations) ProtoMessage() {}
func (*Annotations) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} }
type Resources struct {
// Amount of CPUs (e.g. 2000000000 = 2 CPU cores)
NanoCPUs int64 `protobuf:"varint,1,opt,name=nano_cpus,json=nanoCpus,proto3" json:"nano_cpus,omitempty"`
// Amount of memory in bytes.
MemoryBytes int64 `protobuf:"varint,2,opt,name=memory_bytes,json=memoryBytes,proto3" json:"memory_bytes,omitempty"`
}
func (m *Resources) Reset() { *m = Resources{} }
func (*Resources) ProtoMessage() {}
func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} }
type ResourceRequirements struct {
Limits *Resources `protobuf:"bytes,1,opt,name=limits" json:"limits,omitempty"`
Reservations *Resources `protobuf:"bytes,2,opt,name=reservations" json:"reservations,omitempty"`
}
func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} }
func (*ResourceRequirements) ProtoMessage() {}
func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4} }
type Platform struct {
// Architecture (e.g. x86_64)
Architecture string `protobuf:"bytes,1,opt,name=architecture,proto3" json:"architecture,omitempty"`
// Operating System (e.g. linux)
OS string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"`
}
func (m *Platform) Reset() { *m = Platform{} }
func (*Platform) ProtoMessage() {}
func (*Platform) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{5} }
// PluginDescription describes an engine plugin.
type PluginDescription struct {
// Type of plugin. Canonical values for existing types are
// Volume, Network, and Authorization. More types could be
// supported in the future.
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Name of the plugin
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (m *PluginDescription) Reset() { *m = PluginDescription{} }
func (*PluginDescription) ProtoMessage() {}
func (*PluginDescription) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{6} }
type EngineDescription struct {
// Docker daemon version running on the node.
EngineVersion string `protobuf:"bytes,1,opt,name=engine_version,json=engineVersion,proto3" json:"engine_version,omitempty"`
// Labels attached to the engine.
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Volume, Network, and Auth plugins
Plugins []PluginDescription `protobuf:"bytes,3,rep,name=plugins" json:"plugins"`
}
func (m *EngineDescription) Reset() { *m = EngineDescription{} }
func (*EngineDescription) ProtoMessage() {}
func (*EngineDescription) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{7} }
type NodeDescription struct {
// Hostname of the node as reported by the agent.
// This is different from spec.meta.name which is user-defined.
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
// Platform of the node.
Platform *Platform `protobuf:"bytes,2,opt,name=platform" json:"platform,omitempty"`
// Total resources on the node.
Resources *Resources `protobuf:"bytes,3,opt,name=resources" json:"resources,omitempty"`
// Information about the Docker Engine on the node.
Engine *EngineDescription `protobuf:"bytes,4,opt,name=engine" json:"engine,omitempty"`
// Information on the node's TLS setup
TLSInfo *NodeTLSInfo `protobuf:"bytes,5,opt,name=tls_info,json=tlsInfo" json:"tls_info,omitempty"`
}
func (m *NodeDescription) Reset() { *m = NodeDescription{} }
func (*NodeDescription) ProtoMessage() {}
func (*NodeDescription) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{8} }
type NodeTLSInfo struct {
// Information about which root certs the node trusts
TrustRoot []byte `protobuf:"bytes,1,opt,name=trust_root,json=trustRoot,proto3" json:"trust_root,omitempty"`
// Information about the node's current TLS certificate
CertIssuerSubject []byte `protobuf:"bytes,2,opt,name=cert_issuer_subject,json=certIssuerSubject,proto3" json:"cert_issuer_subject,omitempty"`
CertIssuerPublicKey []byte `protobuf:"bytes,3,opt,name=cert_issuer_public_key,json=certIssuerPublicKey,proto3" json:"cert_issuer_public_key,omitempty"`
}
func (m *NodeTLSInfo) Reset() { *m = NodeTLSInfo{} }
func (*NodeTLSInfo) ProtoMessage() {}
func (*NodeTLSInfo) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{9} }
type RaftMemberStatus struct {
Leader bool `protobuf:"varint,1,opt,name=leader,proto3" json:"leader,omitempty"`
Reachability RaftMemberStatus_Reachability `protobuf:"varint,2,opt,name=reachability,proto3,enum=docker.swarmkit.v1.RaftMemberStatus_Reachability" json:"reachability,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
}
func (m *RaftMemberStatus) Reset() { *m = RaftMemberStatus{} }
func (*RaftMemberStatus) ProtoMessage() {}
func (*RaftMemberStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{10} }
type NodeStatus struct {
State NodeStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=docker.swarmkit.v1.NodeStatus_State" json:"state,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// Addr is the node's IP address as observed by the manager
Addr string `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"`
}
func (m *NodeStatus) Reset() { *m = NodeStatus{} }
func (*NodeStatus) ProtoMessage() {}
func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{11} }
type Image struct {
// reference is a docker image reference. This can include a rpository, tag
// or be fully qualified witha digest. The format is specified in the
// distribution/reference package.
Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"`
}
func (m *Image) Reset() { *m = Image{} }
func (*Image) ProtoMessage() {}
func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{12} }
// Mount describes volume mounts for a container.
//
// The Mount type follows the structure of the mount syscall, including a type,
// source, target. Top-level flags, such as writable, are common to all kinds
// of mounts, where we also provide options that are specific to a type of
// mount. This corresponds to flags and data, respectively, in the syscall.
type Mount struct {
// Type defines the nature of the mount.
Type Mount_MountType `protobuf:"varint,1,opt,name=type,proto3,enum=docker.swarmkit.v1.Mount_MountType" json:"type,omitempty"`
// Source specifies the name of the mount. Depending on mount type, this
// may be a volume name or a host path, or even ignored.
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
// Target path in container
Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
// ReadOnly should be set to true if the mount should not be writable.
ReadOnly bool `protobuf:"varint,4,opt,name=readonly,proto3" json:"readonly,omitempty"`
// BindOptions configures properties of a bind mount type.
//
// For mounts of type bind, the source must be an absolute host path.
BindOptions *Mount_BindOptions `protobuf:"bytes,5,opt,name=bind_options,json=bindOptions" json:"bind_options,omitempty"`
// VolumeOptions configures the properties specific to a volume mount type.
//
// For mounts of type volume, the source will be used as the volume name.
VolumeOptions *Mount_VolumeOptions `protobuf:"bytes,6,opt,name=volume_options,json=volumeOptions" json:"volume_options,omitempty"`
// TmpfsOptions allows one to set options for mounting a temporary
// filesystem.
//
// The source field will be ignored when using mounts of type tmpfs.
TmpfsOptions *Mount_TmpfsOptions `protobuf:"bytes,7,opt,name=tmpfs_options,json=tmpfsOptions" json:"tmpfs_options,omitempty"`
}
func (m *Mount) Reset() { *m = Mount{} }
func (*Mount) ProtoMessage() {}
func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{13} }
// BindOptions specifies options that are specific to a bind mount.
type Mount_BindOptions struct {
// Propagation mode of mount.
Propagation Mount_BindOptions_MountPropagation `protobuf:"varint,1,opt,name=propagation,proto3,enum=docker.swarmkit.v1.Mount_BindOptions_MountPropagation" json:"propagation,omitempty"`
}
func (m *Mount_BindOptions) Reset() { *m = Mount_BindOptions{} }
func (*Mount_BindOptions) ProtoMessage() {}
func (*Mount_BindOptions) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{13, 0} }
// VolumeOptions contains parameters for mounting the volume.
type Mount_VolumeOptions struct {
// nocopy prevents automatic copying of data to the volume with data from target
NoCopy bool `protobuf:"varint,1,opt,name=nocopy,proto3" json:"nocopy,omitempty"`
// labels to apply to the volume if creating
Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// DriverConfig specifies the options that may be passed to the driver
// if the volume is created.
//
// If this is empty, no volume will be created if the volume is missing.
DriverConfig *Driver `protobuf:"bytes,3,opt,name=driver_config,json=driverConfig" json:"driver_config,omitempty"`
}
func (m *Mount_VolumeOptions) Reset() { *m = Mount_VolumeOptions{} }
func (*Mount_VolumeOptions) ProtoMessage() {}
func (*Mount_VolumeOptions) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{13, 1} }
type Mount_TmpfsOptions struct {
// Size sets the size of the tmpfs, in bytes.
//
// This will be converted to an operating system specific value
// depending on the host. For example, on linux, it will be convered to
// use a 'k', 'm' or 'g' syntax. BSD, though not widely supported with
// docker, uses a straight byte value.
//
// Percentages are not supported.
SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
// Mode of the tmpfs upon creation
Mode os.FileMode `protobuf:"varint,2,opt,name=mode,proto3,customtype=os.FileMode" json:"mode"`
}
func (m *Mount_TmpfsOptions) Reset() { *m = Mount_TmpfsOptions{} }
func (*Mount_TmpfsOptions) ProtoMessage() {}
func (*Mount_TmpfsOptions) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{13, 2} }
type RestartPolicy struct {
Condition RestartPolicy_RestartCondition `protobuf:"varint,1,opt,name=condition,proto3,enum=docker.swarmkit.v1.RestartPolicy_RestartCondition" json:"condition,omitempty"`
// Delay between restart attempts
// Note: can't use stdduration because this field needs to be nullable.
Delay *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=delay" json:"delay,omitempty"`
// MaxAttempts is the maximum number of restarts to attempt on an
// instance before giving up. Ignored if 0.
MaxAttempts uint64 `protobuf:"varint,3,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"`
// Window is the time window used to evaluate the restart policy.
// The time window is unbounded if this is 0.
// Note: can't use stdduration because this field needs to be nullable.
Window *google_protobuf1.Duration `protobuf:"bytes,4,opt,name=window" json:"window,omitempty"`
}
func (m *RestartPolicy) Reset() { *m = RestartPolicy{} }
func (*RestartPolicy) ProtoMessage() {}
func (*RestartPolicy) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{14} }
// UpdateConfig specifies the rate and policy of updates.
// TODO(aluzzardi): Consider making this a oneof with RollingStrategy and LockstepStrategy.
type UpdateConfig struct {
// Maximum number of tasks to be updated in one iteration.
// 0 means unlimited parallelism.
Parallelism uint64 `protobuf:"varint,1,opt,name=parallelism,proto3" json:"parallelism,omitempty"`
// Amount of time between updates.
Delay time.Duration `protobuf:"bytes,2,opt,name=delay,stdduration" json:"delay"`
// FailureAction is the action to take when an update failures.
FailureAction UpdateConfig_FailureAction `protobuf:"varint,3,opt,name=failure_action,json=failureAction,proto3,enum=docker.swarmkit.v1.UpdateConfig_FailureAction" json:"failure_action,omitempty"`
// Monitor indicates how long to monitor a task for failure after it is
// created. If the task fails by ending up in one of the states
// REJECTED, COMPLETED, or FAILED, within Monitor from its creation,
// this counts as a failure. If it fails after Monitor, it does not
// count as a failure. If Monitor is unspecified, a default value will
// be used.
// Note: can't use stdduration because this field needs to be nullable.
Monitor *google_protobuf1.Duration `protobuf:"bytes,4,opt,name=monitor" json:"monitor,omitempty"`
// MaxFailureRatio is the fraction of tasks that may fail during
// an update before the failure action is invoked. Any task created by
// the current update which ends up in one of the states REJECTED,
// COMPLETED or FAILED within Monitor from its creation counts as a
// failure. The number of failures is divided by the number of tasks
// being updated, and if this fraction is greater than
// MaxFailureRatio, the failure action is invoked.
//
// If the failure action is CONTINUE, there is no effect.
// If the failure action is PAUSE, no more tasks will be updated until
// another update is started.
// If the failure action is ROLLBACK, the orchestrator will attempt to
// roll back to the previous service spec. If the MaxFailureRatio
// threshold is hit during the rollback, the rollback will pause.
MaxFailureRatio float32 `protobuf:"fixed32,5,opt,name=max_failure_ratio,json=maxFailureRatio,proto3" json:"max_failure_ratio,omitempty"`
Order UpdateConfig_UpdateOrder `protobuf:"varint,6,opt,name=order,proto3,enum=docker.swarmkit.v1.UpdateConfig_UpdateOrder" json:"order,omitempty"`
}
func (m *UpdateConfig) Reset() { *m = UpdateConfig{} }
func (*UpdateConfig) ProtoMessage() {}
func (*UpdateConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{15} }
// UpdateStatus is the status of an update in progress.
type UpdateStatus struct {
// State is the state of this update. It indicates whether the
// update is in progress, completed, paused, rolling back, or
// finished rolling back.
State UpdateStatus_UpdateState `protobuf:"varint,1,opt,name=state,proto3,enum=docker.swarmkit.v1.UpdateStatus_UpdateState" json:"state,omitempty"`
// StartedAt is the time at which the update was started.
// Note: can't use stdtime because this field is nullable.
StartedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt" json:"started_at,omitempty"`
// CompletedAt is the time at which the update completed successfully,
// paused, or finished rolling back.
// Note: can't use stdtime because this field is nullable.
CompletedAt *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=completed_at,json=completedAt" json:"completed_at,omitempty"`
// Message explains how the update got into its current state. For
// example, if the update is paused, it will explain what is preventing
// the update from proceeding (typically the failure of a task to start up
// when OnFailure is PAUSE).
Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
}
func (m *UpdateStatus) Reset() { *m = UpdateStatus{} }
func (*UpdateStatus) ProtoMessage() {}
func (*UpdateStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{16} }
// Container specific status.
type ContainerStatus struct {
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
PID int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
ExitCode int32 `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
}
func (m *ContainerStatus) Reset() { *m = ContainerStatus{} }
func (*ContainerStatus) ProtoMessage() {}
func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{17} }
// PortStatus specifies the actual allocated runtime state of a list
// of port configs.
type PortStatus struct {
Ports []*PortConfig `protobuf:"bytes,1,rep,name=ports" json:"ports,omitempty"`
}
func (m *PortStatus) Reset() { *m = PortStatus{} }
func (*PortStatus) ProtoMessage() {}
func (*PortStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{18} }
type TaskStatus struct {
// Note: can't use stdtime because this field is nullable.
Timestamp *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
// State expresses the current state of the task.
State TaskState `protobuf:"varint,2,opt,name=state,proto3,enum=docker.swarmkit.v1.TaskState" json:"state,omitempty"`
// Message reports a message for the task status. This should provide a
// human readable message that can point to how the task actually arrived
// at a current state.
//
// As a convention, we place the a small message here that led to the
// current state. For example, if the task is in ready, because it was
// prepared, we'd place "prepared" in this field. If we skipped preparation
// because the task is prepared, we would put "already prepared" in this
// field.
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
// Err is set if the task is in an error state.
//
// The following states should report a companion error:
//
// FAILED, REJECTED
//
// TODO(stevvooe) Integrate this field with the error interface.
Err string `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"`
// Container status contains container specific status information.
//
// Types that are valid to be assigned to RuntimeStatus:
// *TaskStatus_Container
RuntimeStatus isTaskStatus_RuntimeStatus `protobuf_oneof:"runtime_status"`
// HostPorts provides a list of ports allocated at the host
// level.
PortStatus *PortStatus `protobuf:"bytes,6,opt,name=port_status,json=portStatus" json:"port_status,omitempty"`
}
func (m *TaskStatus) Reset() { *m = TaskStatus{} }
func (*TaskStatus) ProtoMessage() {}
func (*TaskStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{19} }
type isTaskStatus_RuntimeStatus interface {
isTaskStatus_RuntimeStatus()
MarshalTo([]byte) (int, error)
Size() int
}
type TaskStatus_Container struct {
Container *ContainerStatus `protobuf:"bytes,5,opt,name=container,oneof"`
}
func (*TaskStatus_Container) isTaskStatus_RuntimeStatus() {}
func (m *TaskStatus) GetRuntimeStatus() isTaskStatus_RuntimeStatus {
if m != nil {
return m.RuntimeStatus
}
return nil
}
func (m *TaskStatus) GetContainer() *ContainerStatus {
if x, ok := m.GetRuntimeStatus().(*TaskStatus_Container); ok {
return x.Container
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*TaskStatus) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _TaskStatus_OneofMarshaler, _TaskStatus_OneofUnmarshaler, _TaskStatus_OneofSizer, []interface{}{
(*TaskStatus_Container)(nil),
}
}
func _TaskStatus_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*TaskStatus)
// runtime_status
switch x := m.RuntimeStatus.(type) {
case *TaskStatus_Container:
_ = b.EncodeVarint(5<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Container); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("TaskStatus.RuntimeStatus has unexpected type %T", x)
}
return nil
}
func _TaskStatus_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*TaskStatus)
switch tag {
case 5: // runtime_status.container
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ContainerStatus)
err := b.DecodeMessage(msg)
m.RuntimeStatus = &TaskStatus_Container{msg}
return true, err
default:
return false, nil
}
}
func _TaskStatus_OneofSizer(msg proto.Message) (n int) {
m := msg.(*TaskStatus)
// runtime_status
switch x := m.RuntimeStatus.(type) {
case *TaskStatus_Container:
s := proto.Size(x.Container)
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// NetworkAttachmentConfig specifies how a service should be attached to a particular network.
//
// For now, this is a simple struct, but this can include future information
// instructing Swarm on how this service should work on the particular
// network.
type NetworkAttachmentConfig struct {
// Target specifies the target network for attachment. This value must be a
// network ID.
Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
// Aliases specifies a list of discoverable alternate names for the service on this Target.
Aliases []string `protobuf:"bytes,2,rep,name=aliases" json:"aliases,omitempty"`
// Addresses specifies a list of ipv4 and ipv6 addresses
// preferred. If these addresses are not available then the
// attachment might fail.
Addresses []string `protobuf:"bytes,3,rep,name=addresses" json:"addresses,omitempty"`
// DriverAttachmentOpts is a map of driver attachment options for the network target
DriverAttachmentOpts map[string]string `protobuf:"bytes,4,rep,name=driver_attachment_opts,json=driverAttachmentOpts" json:"driver_attachment_opts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *NetworkAttachmentConfig) Reset() { *m = NetworkAttachmentConfig{} }
func (*NetworkAttachmentConfig) ProtoMessage() {}
func (*NetworkAttachmentConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{20} }
// IPAMConfig specifies parameters for IP Address Management.
type IPAMConfig struct {
Family IPAMConfig_AddressFamily `protobuf:"varint,1,opt,name=family,proto3,enum=docker.swarmkit.v1.IPAMConfig_AddressFamily" json:"family,omitempty"`
// Subnet defines a network as a CIDR address (ie network and mask
// 192.168.0.1/24).
Subnet string `protobuf:"bytes,2,opt,name=subnet,proto3" json:"subnet,omitempty"`
// Range defines the portion of the subnet to allocate to tasks. This is
// defined as a subnet within the primary subnet.
Range string `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"`
// Gateway address within the subnet.
Gateway string `protobuf:"bytes,4,opt,name=gateway,proto3" json:"gateway,omitempty"`
// Reserved is a list of address from the master pool that should *not* be
// allocated. These addresses may have already been allocated or may be
// reserved for another allocation manager.
Reserved map[string]string `protobuf:"bytes,5,rep,name=reserved" json:"reserved,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *IPAMConfig) Reset() { *m = IPAMConfig{} }
func (*IPAMConfig) ProtoMessage() {}
func (*IPAMConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{21} }
// PortConfig specifies an exposed port which can be
// addressed using the given name. This can be later queried
// using a service discovery api or a DNS SRV query. The node
// port specifies a port that can be used to address this
// service external to the cluster by sending a connection
// request to this port to any node on the cluster.
type PortConfig struct {
// Name for the port. If provided the port information can
// be queried using the name as in a DNS SRV query.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Protocol for the port which is exposed.
Protocol PortConfig_Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=docker.swarmkit.v1.PortConfig_Protocol" json:"protocol,omitempty"`
// The port which the application is exposing and is bound to.
TargetPort uint32 `protobuf:"varint,3,opt,name=target_port,json=targetPort,proto3" json:"target_port,omitempty"`
// PublishedPort specifies the port on which the service is exposed. If
// specified, the port must be within the available range. If not specified
// (value is zero), an available port is automatically assigned.
PublishedPort uint32 `protobuf:"varint,4,opt,name=published_port,json=publishedPort,proto3" json:"published_port,omitempty"`
// PublishMode controls how the port is published.
PublishMode PortConfig_PublishMode `protobuf:"varint,5,opt,name=publish_mode,json=publishMode,proto3,enum=docker.swarmkit.v1.PortConfig_PublishMode" json:"publish_mode,omitempty"`
}
func (m *PortConfig) Reset() { *m = PortConfig{} }
func (*PortConfig) ProtoMessage() {}
func (*PortConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{22} }
// Driver is a generic driver type to be used throughout the API. For now, a
// driver is simply a name and set of options. The field contents depend on the
// target use case and driver application. For example, a network driver may
// have different rules than a volume driver.
type Driver struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Options map[string]string `protobuf:"bytes,2,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *Driver) Reset() { *m = Driver{} }
func (*Driver) ProtoMessage() {}
func (*Driver) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{23} }
type IPAMOptions struct {
Driver *Driver `protobuf:"bytes,1,opt,name=driver" json:"driver,omitempty"`
Configs []*IPAMConfig `protobuf:"bytes,3,rep,name=configs" json:"configs,omitempty"`
}
func (m *IPAMOptions) Reset() { *m = IPAMOptions{} }
func (*IPAMOptions) ProtoMessage() {}
func (*IPAMOptions) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{24} }
// Peer should be used anywhere where we are describing a remote peer.
type Peer struct {
NodeID string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
}
func (m *Peer) Reset() { *m = Peer{} }
func (*Peer) ProtoMessage() {}
func (*Peer) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{25} }
// WeightedPeer should be used anywhere where we are describing a remote peer
// with a weight.
type WeightedPeer struct {
Peer *Peer `protobuf:"bytes,1,opt,name=peer" json:"peer,omitempty"`
Weight int64 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"`
}
func (m *WeightedPeer) Reset() { *m = WeightedPeer{} }
func (*WeightedPeer) ProtoMessage() {}
func (*WeightedPeer) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{26} }
type IssuanceStatus struct {
State IssuanceStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=docker.swarmkit.v1.IssuanceStatus_State" json:"state,omitempty"`
// Err is set if the Certificate Issuance is in an error state.
// The following states should report a companion error:
// FAILED
Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
}
func (m *IssuanceStatus) Reset() { *m = IssuanceStatus{} }
func (*IssuanceStatus) ProtoMessage() {}
func (*IssuanceStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{27} }
type AcceptancePolicy struct {
Policies []*AcceptancePolicy_RoleAdmissionPolicy `protobuf:"bytes,1,rep,name=policies" json:"policies,omitempty"`
}
func (m *AcceptancePolicy) Reset() { *m = AcceptancePolicy{} }
func (*AcceptancePolicy) ProtoMessage() {}
func (*AcceptancePolicy) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{28} }
type AcceptancePolicy_RoleAdmissionPolicy struct {
Role NodeRole `protobuf:"varint,1,opt,name=role,proto3,enum=docker.swarmkit.v1.NodeRole" json:"role,omitempty"`
// Autoaccept controls which roles' certificates are automatically
// issued without administrator intervention.
Autoaccept bool `protobuf:"varint,2,opt,name=autoaccept,proto3" json:"autoaccept,omitempty"`
// Secret represents a user-provided string that is necessary for new
// nodes to join the cluster
Secret *AcceptancePolicy_RoleAdmissionPolicy_Secret `protobuf:"bytes,3,opt,name=secret" json:"secret,omitempty"`
}
func (m *AcceptancePolicy_RoleAdmissionPolicy) Reset() { *m = AcceptancePolicy_RoleAdmissionPolicy{} }
func (*AcceptancePolicy_RoleAdmissionPolicy) ProtoMessage() {}
func (*AcceptancePolicy_RoleAdmissionPolicy) Descriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{28, 0}
}
type AcceptancePolicy_RoleAdmissionPolicy_Secret struct {
// The actual content (possibly hashed)
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// The type of hash we are using, or "plaintext"
Alg string `protobuf:"bytes,2,opt,name=alg,proto3" json:"alg,omitempty"`
}
func (m *AcceptancePolicy_RoleAdmissionPolicy_Secret) Reset() {
*m = AcceptancePolicy_RoleAdmissionPolicy_Secret{}
}
func (*AcceptancePolicy_RoleAdmissionPolicy_Secret) ProtoMessage() {}
func (*AcceptancePolicy_RoleAdmissionPolicy_Secret) Descriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{28, 0, 0}
}
type ExternalCA struct {
// Protocol is the protocol used by this external CA.
Protocol ExternalCA_CAProtocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=docker.swarmkit.v1.ExternalCA_CAProtocol" json:"protocol,omitempty"`
// URL is the URL where the external CA can be reached.
URL string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
// Options is a set of additional key/value pairs whose interpretation
// depends on the specified CA type.
Options map[string]string `protobuf:"bytes,3,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// CACert specifies which root CA is used by this external CA
CACert []byte `protobuf:"bytes,4,opt,name=ca_cert,json=caCert,proto3" json:"ca_cert,omitempty"`
}
func (m *ExternalCA) Reset() { *m = ExternalCA{} }
func (*ExternalCA) ProtoMessage() {}
func (*ExternalCA) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{29} }
type CAConfig struct {
// NodeCertExpiry is the duration certificates should be issued for
// Note: can't use stdduration because this field needs to be nullable.
NodeCertExpiry *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=node_cert_expiry,json=nodeCertExpiry" json:"node_cert_expiry,omitempty"`
// ExternalCAs is a list of CAs to which a manager node will make
// certificate signing requests for node certificates.
ExternalCAs []*ExternalCA `protobuf:"bytes,2,rep,name=external_cas,json=externalCas" json:"external_cas,omitempty"`
// SigningCACert is the desired CA certificate to be used as the root and
// signing CA for the swarm. If not provided, indicates that we are either happy
// with the current configuration, or (together with a bump in the ForceRotate value)
// that we want a certificate and key generated for us.
SigningCACert []byte `protobuf:"bytes,3,opt,name=signing_ca_cert,json=signingCaCert,proto3" json:"signing_ca_cert,omitempty"`
// SigningCAKey is the desired private key, matching the signing CA cert, to be used
// to sign certificates for the swarm
SigningCAKey []byte `protobuf:"bytes,4,opt,name=signing_ca_key,json=signingCaKey,proto3" json:"signing_ca_key,omitempty"`
// ForceRotate is a counter that triggers a root CA rotation even if no relevant
// parameters have been in the spec. This will force the manager to generate a new
// certificate and key, if none have been provided.
ForceRotate uint64 `protobuf:"varint,5,opt,name=force_rotate,json=forceRotate,proto3" json:"force_rotate,omitempty"`
}
func (m *CAConfig) Reset() { *m = CAConfig{} }
func (*CAConfig) ProtoMessage() {}
func (*CAConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{30} }
// OrchestrationConfig defines cluster-level orchestration settings.
type OrchestrationConfig struct {
// TaskHistoryRetentionLimit is the number of historic tasks to keep per instance or
// node. If negative, never remove completed or failed tasks.
TaskHistoryRetentionLimit int64 `protobuf:"varint,1,opt,name=task_history_retention_limit,json=taskHistoryRetentionLimit,proto3" json:"task_history_retention_limit,omitempty"`
}
func (m *OrchestrationConfig) Reset() { *m = OrchestrationConfig{} }
func (*OrchestrationConfig) ProtoMessage() {}
func (*OrchestrationConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{31} }
// TaskDefaults specifies default values for task creation.
type TaskDefaults struct {
// LogDriver specifies the log driver to use for the cluster if not
// specified for each task.
//
// If this is changed, only new tasks will pick up the new log driver.
// Existing tasks will continue to use the previous default until rescheduled.
LogDriver *Driver `protobuf:"bytes,1,opt,name=log_driver,json=logDriver" json:"log_driver,omitempty"`
}
func (m *TaskDefaults) Reset() { *m = TaskDefaults{} }
func (*TaskDefaults) ProtoMessage() {}
func (*TaskDefaults) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{32} }
// DispatcherConfig defines cluster-level dispatcher settings.
type DispatcherConfig struct {
// HeartbeatPeriod defines how often agent should send heartbeats to
// dispatcher.
// Note: can't use stdduration because this field needs to be nullable.
HeartbeatPeriod *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=heartbeat_period,json=heartbeatPeriod" json:"heartbeat_period,omitempty"`
}
func (m *DispatcherConfig) Reset() { *m = DispatcherConfig{} }
func (*DispatcherConfig) ProtoMessage() {}
func (*DispatcherConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{33} }
// RaftConfig defines raft settings for the cluster.
type RaftConfig struct {
// SnapshotInterval is the number of log entries between snapshots.
SnapshotInterval uint64 `protobuf:"varint,1,opt,name=snapshot_interval,json=snapshotInterval,proto3" json:"snapshot_interval,omitempty"`
// KeepOldSnapshots is the number of snapshots to keep beyond the
// current snapshot.
KeepOldSnapshots uint64 `protobuf:"varint,2,opt,name=keep_old_snapshots,json=keepOldSnapshots,proto3" json:"keep_old_snapshots,omitempty"`
// LogEntriesForSlowFollowers is the number of log entries to keep
// around to sync up slow followers after a snapshot is created.
LogEntriesForSlowFollowers uint64 `protobuf:"varint,3,opt,name=log_entries_for_slow_followers,json=logEntriesForSlowFollowers,proto3" json:"log_entries_for_slow_followers,omitempty"`
// HeartbeatTick defines the amount of ticks (in seconds) between
// each heartbeat message sent to other members for health-check.
HeartbeatTick uint32 `protobuf:"varint,4,opt,name=heartbeat_tick,json=heartbeatTick,proto3" json:"heartbeat_tick,omitempty"`
// ElectionTick defines the amount of ticks (in seconds) needed
// without a leader to trigger a new election.
ElectionTick uint32 `protobuf:"varint,5,opt,name=election_tick,json=electionTick,proto3" json:"election_tick,omitempty"`
}
func (m *RaftConfig) Reset() { *m = RaftConfig{} }
func (*RaftConfig) ProtoMessage() {}
func (*RaftConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{34} }
type EncryptionConfig struct {
// AutoLockManagers specifies whether or not managers TLS keys and raft data
// should be encrypted at rest in such a way that they must be unlocked
// before the manager node starts up again.
AutoLockManagers bool `protobuf:"varint,1,opt,name=auto_lock_managers,json=autoLockManagers,proto3" json:"auto_lock_managers,omitempty"`
}
func (m *EncryptionConfig) Reset() { *m = EncryptionConfig{} }
func (*EncryptionConfig) ProtoMessage() {}
func (*EncryptionConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{35} }
type SpreadOver struct {
SpreadDescriptor string `protobuf:"bytes,1,opt,name=spread_descriptor,json=spreadDescriptor,proto3" json:"spread_descriptor,omitempty"`
}
func (m *SpreadOver) Reset() { *m = SpreadOver{} }
func (*SpreadOver) ProtoMessage() {}
func (*SpreadOver) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{36} }
type PlacementPreference struct {
// Types that are valid to be assigned to Preference:
// *PlacementPreference_Spread
Preference isPlacementPreference_Preference `protobuf_oneof:"Preference"`
}
func (m *PlacementPreference) Reset() { *m = PlacementPreference{} }
func (*PlacementPreference) ProtoMessage() {}
func (*PlacementPreference) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{37} }
type isPlacementPreference_Preference interface {
isPlacementPreference_Preference()
MarshalTo([]byte) (int, error)
Size() int
}
type PlacementPreference_Spread struct {
Spread *SpreadOver `protobuf:"bytes,1,opt,name=spread,oneof"`
}
func (*PlacementPreference_Spread) isPlacementPreference_Preference() {}
func (m *PlacementPreference) GetPreference() isPlacementPreference_Preference {
if m != nil {
return m.Preference
}
return nil
}
func (m *PlacementPreference) GetSpread() *SpreadOver {
if x, ok := m.GetPreference().(*PlacementPreference_Spread); ok {
return x.Spread
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*PlacementPreference) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _PlacementPreference_OneofMarshaler, _PlacementPreference_OneofUnmarshaler, _PlacementPreference_OneofSizer, []interface{}{
(*PlacementPreference_Spread)(nil),
}
}
func _PlacementPreference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*PlacementPreference)
// Preference
switch x := m.Preference.(type) {
case *PlacementPreference_Spread:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Spread); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("PlacementPreference.Preference has unexpected type %T", x)
}
return nil
}
func _PlacementPreference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*PlacementPreference)
switch tag {
case 1: // Preference.spread
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(SpreadOver)
err := b.DecodeMessage(msg)
m.Preference = &PlacementPreference_Spread{msg}
return true, err
default:
return false, nil
}
}
func _PlacementPreference_OneofSizer(msg proto.Message) (n int) {
m := msg.(*PlacementPreference)
// Preference
switch x := m.Preference.(type) {
case *PlacementPreference_Spread:
s := proto.Size(x.Spread)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Placement specifies task distribution constraints.
type Placement struct {
// Constraints specifies a set of requirements a node should meet for a task.
Constraints []string `protobuf:"bytes,1,rep,name=constraints" json:"constraints,omitempty"`
// Preferences provide a way to make the scheduler aware of factors
// such as topology. They are provided in order from highest to lowest
// precedence.
Preferences []*PlacementPreference `protobuf:"bytes,2,rep,name=preferences" json:"preferences,omitempty"`
// Platforms stores all the platforms that the image can run on.
// This field is used in the platform filter for scheduling. If empty,
// then the platform filter is off, meaning there are no scheduling restrictions.
Platforms []*Platform `protobuf:"bytes,3,rep,name=platforms" json:"platforms,omitempty"`
}
func (m *Placement) Reset() { *m = Placement{} }
func (*Placement) ProtoMessage() {}
func (*Placement) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{38} }
// JoinToken contains the join tokens for workers and managers.
type JoinTokens struct {
// Worker is the join token workers may use to join the swarm.
Worker string `protobuf:"bytes,1,opt,name=worker,proto3" json:"worker,omitempty"`
// Manager is the join token workers may use to join the swarm.
Manager string `protobuf:"bytes,2,opt,name=manager,proto3" json:"manager,omitempty"`
}
func (m *JoinTokens) Reset() { *m = JoinTokens{} }
func (*JoinTokens) ProtoMessage() {}
func (*JoinTokens) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{39} }
type RootCA struct {
// CAKey is the root CA private key.
CAKey []byte `protobuf:"bytes,1,opt,name=ca_key,json=caKey,proto3" json:"ca_key,omitempty"`
// CACert is the root CA certificate.
CACert []byte `protobuf:"bytes,2,opt,name=ca_cert,json=caCert,proto3" json:"ca_cert,omitempty"`
// CACertHash is the digest of the CA Certificate.
CACertHash string `protobuf:"bytes,3,opt,name=ca_cert_hash,json=caCertHash,proto3" json:"ca_cert_hash,omitempty"`
// JoinTokens contains the join tokens for workers and managers.
JoinTokens JoinTokens `protobuf:"bytes,4,opt,name=join_tokens,json=joinTokens" json:"join_tokens"`
// RootRotation contains the new root cert and key we want to rotate to - if this is nil, we are not in the
// middle of a root rotation
RootRotation *RootRotation `protobuf:"bytes,5,opt,name=root_rotation,json=rootRotation" json:"root_rotation,omitempty"`
// LastForcedRotation matches the Cluster Spec's CAConfig's ForceRotation counter.
// It indicates when the current CA cert and key were generated (or updated).
LastForcedRotation uint64 `protobuf:"varint,6,opt,name=last_forced_rotation,json=lastForcedRotation,proto3" json:"last_forced_rotation,omitempty"`
}
func (m *RootCA) Reset() { *m = RootCA{} }
func (*RootCA) ProtoMessage() {}
func (*RootCA) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{40} }
type Certificate struct {
Role NodeRole `protobuf:"varint,1,opt,name=role,proto3,enum=docker.swarmkit.v1.NodeRole" json:"role,omitempty"`
CSR []byte `protobuf:"bytes,2,opt,name=csr,proto3" json:"csr,omitempty"`
Status IssuanceStatus `protobuf:"bytes,3,opt,name=status" json:"status"`
Certificate []byte `protobuf:"bytes,4,opt,name=certificate,proto3" json:"certificate,omitempty"`
// CN represents the node ID.
CN string `protobuf:"bytes,5,opt,name=cn,proto3" json:"cn,omitempty"`
}
func (m *Certificate) Reset() { *m = Certificate{} }
func (*Certificate) ProtoMessage() {}
func (*Certificate) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{41} }
// Symmetric keys to encrypt inter-agent communication.
type EncryptionKey struct {
// Agent subsystem the key is intended for. Example:
// networking:gossip
Subsystem string `protobuf:"bytes,1,opt,name=subsystem,proto3" json:"subsystem,omitempty"`
Algorithm EncryptionKey_Algorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=docker.swarmkit.v1.EncryptionKey_Algorithm" json:"algorithm,omitempty"`
Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
// Time stamp from the lamport clock of the key allocator to
// identify the relative age of the key.
LamportTime uint64 `protobuf:"varint,4,opt,name=lamport_time,json=lamportTime,proto3" json:"lamport_time,omitempty"`
}
func (m *EncryptionKey) Reset() { *m = EncryptionKey{} }
func (*EncryptionKey) ProtoMessage() {}
func (*EncryptionKey) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{42} }
// ManagerStatus provides informations about the state of a manager in the cluster.
type ManagerStatus struct {
// RaftID specifies the internal ID used by the manager in a raft context, it can never be modified
// and is used only for information purposes
RaftID uint64 `protobuf:"varint,1,opt,name=raft_id,json=raftId,proto3" json:"raft_id,omitempty"`
// Addr is the address advertised to raft.
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
// Leader is set to true if this node is the raft leader.
Leader bool `protobuf:"varint,3,opt,name=leader,proto3" json:"leader,omitempty"`
// Reachability specifies whether this node is reachable.
Reachability RaftMemberStatus_Reachability `protobuf:"varint,4,opt,name=reachability,proto3,enum=docker.swarmkit.v1.RaftMemberStatus_Reachability" json:"reachability,omitempty"`
}
func (m *ManagerStatus) Reset() { *m = ManagerStatus{} }
func (*ManagerStatus) ProtoMessage() {}
func (*ManagerStatus) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{43} }
// FileTarget represents a specific target that is backed by a file
type FileTarget struct {
// Name represents the final filename in the filesystem
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// UID represents the file UID
UID string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// GID represents the file GID
GID string `protobuf:"bytes,3,opt,name=gid,proto3" json:"gid,omitempty"`
// Mode represents the FileMode of the file
Mode os.FileMode `protobuf:"varint,4,opt,name=mode,proto3,customtype=os.FileMode" json:"mode"`
}
func (m *FileTarget) Reset() { *m = FileTarget{} }
func (*FileTarget) ProtoMessage() {}
func (*FileTarget) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{44} }
// SecretReference is the linkage between a service and a secret that it uses.
type SecretReference struct {
// SecretID represents the ID of the specific Secret that we're
// referencing. This identifier exists so that SecretReferences don't leak
// any information about the secret contents.
SecretID string `protobuf:"bytes,1,opt,name=secret_id,json=secretId,proto3" json:"secret_id,omitempty"`
// SecretName is the name of the secret that this references, but this is just provided for
// lookup/display purposes. The secret in the reference will be identified by its ID.
SecretName string `protobuf:"bytes,2,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"`
// Target specifies how this secret should be exposed to the task.
//
// Types that are valid to be assigned to Target:
// *SecretReference_File
Target isSecretReference_Target `protobuf_oneof:"target"`
}
func (m *SecretReference) Reset() { *m = SecretReference{} }
func (*SecretReference) ProtoMessage() {}
func (*SecretReference) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{45} }
type isSecretReference_Target interface {
isSecretReference_Target()
MarshalTo([]byte) (int, error)
Size() int
}
type SecretReference_File struct {
File *FileTarget `protobuf:"bytes,3,opt,name=file,oneof"`
}
func (*SecretReference_File) isSecretReference_Target() {}
func (m *SecretReference) GetTarget() isSecretReference_Target {
if m != nil {
return m.Target
}
return nil
}
func (m *SecretReference) GetFile() *FileTarget {
if x, ok := m.GetTarget().(*SecretReference_File); ok {
return x.File
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*SecretReference) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _SecretReference_OneofMarshaler, _SecretReference_OneofUnmarshaler, _SecretReference_OneofSizer, []interface{}{
(*SecretReference_File)(nil),
}
}
func _SecretReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*SecretReference)
// target
switch x := m.Target.(type) {
case *SecretReference_File:
_ = b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.File); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("SecretReference.Target has unexpected type %T", x)
}
return nil
}
func _SecretReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*SecretReference)
switch tag {
case 3: // target.file
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(FileTarget)
err := b.DecodeMessage(msg)
m.Target = &SecretReference_File{msg}
return true, err
default:
return false, nil
}
}
func _SecretReference_OneofSizer(msg proto.Message) (n int) {
m := msg.(*SecretReference)
// target
switch x := m.Target.(type) {
case *SecretReference_File:
s := proto.Size(x.File)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// ConfigReference is the linkage between a service and a config that it uses.
type ConfigReference struct {
// ConfigID represents the ID of the specific Config that we're
// referencing.
ConfigID string `protobuf:"bytes,1,opt,name=config_id,json=configId,proto3" json:"config_id,omitempty"`
// ConfigName is the name of the config that this references, but this is just provided for
// lookup/display purposes. The config in the reference will be identified by its ID.
ConfigName string `protobuf:"bytes,2,opt,name=config_name,json=configName,proto3" json:"config_name,omitempty"`
// Target specifies how this secret should be exposed to the task.
//
// Types that are valid to be assigned to Target:
// *ConfigReference_File
Target isConfigReference_Target `protobuf_oneof:"target"`
}
func (m *ConfigReference) Reset() { *m = ConfigReference{} }
func (*ConfigReference) ProtoMessage() {}
func (*ConfigReference) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{46} }
type isConfigReference_Target interface {
isConfigReference_Target()
MarshalTo([]byte) (int, error)
Size() int
}
type ConfigReference_File struct {
File *FileTarget `protobuf:"bytes,3,opt,name=file,oneof"`
}
func (*ConfigReference_File) isConfigReference_Target() {}
func (m *ConfigReference) GetTarget() isConfigReference_Target {
if m != nil {
return m.Target
}
return nil
}
func (m *ConfigReference) GetFile() *FileTarget {
if x, ok := m.GetTarget().(*ConfigReference_File); ok {
return x.File
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*ConfigReference) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _ConfigReference_OneofMarshaler, _ConfigReference_OneofUnmarshaler, _ConfigReference_OneofSizer, []interface{}{
(*ConfigReference_File)(nil),
}
}
func _ConfigReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*ConfigReference)
// target
switch x := m.Target.(type) {
case *ConfigReference_File:
_ = b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.File); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("ConfigReference.Target has unexpected type %T", x)
}
return nil
}
func _ConfigReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*ConfigReference)
switch tag {
case 3: // target.file
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(FileTarget)
err := b.DecodeMessage(msg)
m.Target = &ConfigReference_File{msg}
return true, err
default:
return false, nil
}
}
func _ConfigReference_OneofSizer(msg proto.Message) (n int) {
m := msg.(*ConfigReference)
// target
switch x := m.Target.(type) {
case *ConfigReference_File:
s := proto.Size(x.File)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// BlacklistedCertificate is a record for a blacklisted certificate. It does not
// contain the certificate's CN, because these records are indexed by CN.
type BlacklistedCertificate struct {
// Expiry is the latest known expiration time of a certificate that
// was issued for the given CN.
// Note: can't use stdtime because this field is nullable.
Expiry *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=expiry" json:"expiry,omitempty"`
}
func (m *BlacklistedCertificate) Reset() { *m = BlacklistedCertificate{} }
func (*BlacklistedCertificate) ProtoMessage() {}
func (*BlacklistedCertificate) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{47} }
// HealthConfig holds configuration settings for the HEALTHCHECK feature.
type HealthConfig struct {
// Test is the test to perform to check that the container is healthy.
// An empty slice means to inherit the default.
// The options are:
// {} : inherit healthcheck
// {"NONE"} : disable healthcheck
// {"CMD", args...} : exec arguments directly
// {"CMD-SHELL", command} : run command with system's default shell
Test []string `protobuf:"bytes,1,rep,name=test" json:"test,omitempty"`
// Interval is the time to wait between checks. Zero means inherit.
// Note: can't use stdduration because this field needs to be nullable.
Interval *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=interval" json:"interval,omitempty"`
// Timeout is the time to wait before considering the check to have hung.
// Zero means inherit.
// Note: can't use stdduration because this field needs to be nullable.
Timeout *google_protobuf1.Duration `protobuf:"bytes,3,opt,name=timeout" json:"timeout,omitempty"`
// Retries is the number of consecutive failures needed to consider a
// container as unhealthy. Zero means inherit.
Retries int32 `protobuf:"varint,4,opt,name=retries,proto3" json:"retries,omitempty"`
// Start period is the period for container initialization during
// which health check failures will note count towards the maximum
// number of retries.
StartPeriod *google_protobuf1.Duration `protobuf:"bytes,5,opt,name=start_period,json=startPeriod" json:"start_period,omitempty"`
}
func (m *HealthConfig) Reset() { *m = HealthConfig{} }
func (*HealthConfig) ProtoMessage() {}
func (*HealthConfig) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{48} }
type MaybeEncryptedRecord struct {
Algorithm MaybeEncryptedRecord_Algorithm `protobuf:"varint,1,opt,name=algorithm,proto3,enum=docker.swarmkit.v1.MaybeEncryptedRecord_Algorithm" json:"algorithm,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
}
func (m *MaybeEncryptedRecord) Reset() { *m = MaybeEncryptedRecord{} }
func (*MaybeEncryptedRecord) ProtoMessage() {}
func (*MaybeEncryptedRecord) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{49} }
type RootRotation struct {
CACert []byte `protobuf:"bytes,1,opt,name=ca_cert,json=caCert,proto3" json:"ca_cert,omitempty"`
CAKey []byte `protobuf:"bytes,2,opt,name=ca_key,json=caKey,proto3" json:"ca_key,omitempty"`
// cross-signed CA cert is the CACert that has been cross-signed by the previous root
CrossSignedCACert []byte `protobuf:"bytes,3,opt,name=cross_signed_ca_cert,json=crossSignedCaCert,proto3" json:"cross_signed_ca_cert,omitempty"`
}
func (m *RootRotation) Reset() { *m = RootRotation{} }
func (*RootRotation) ProtoMessage() {}
func (*RootRotation) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{50} }
// Privileges specifies security configuration/permissions.
type Privileges struct {
CredentialSpec *Privileges_CredentialSpec `protobuf:"bytes,1,opt,name=credential_spec,json=credentialSpec" json:"credential_spec,omitempty"`
SELinuxContext *Privileges_SELinuxContext `protobuf:"bytes,2,opt,name=selinux_context,json=selinuxContext" json:"selinux_context,omitempty"`
}
func (m *Privileges) Reset() { *m = Privileges{} }
func (*Privileges) ProtoMessage() {}
func (*Privileges) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{51} }
// CredentialSpec for managed service account (Windows only).
type Privileges_CredentialSpec struct {
// Types that are valid to be assigned to Source:
// *Privileges_CredentialSpec_File
// *Privileges_CredentialSpec_Registry
Source isPrivileges_CredentialSpec_Source `protobuf_oneof:"source"`
}
func (m *Privileges_CredentialSpec) Reset() { *m = Privileges_CredentialSpec{} }
func (*Privileges_CredentialSpec) ProtoMessage() {}
func (*Privileges_CredentialSpec) Descriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{51, 0}
}
type isPrivileges_CredentialSpec_Source interface {
isPrivileges_CredentialSpec_Source()
MarshalTo([]byte) (int, error)
Size() int
}
type Privileges_CredentialSpec_File struct {
File string `protobuf:"bytes,1,opt,name=file,proto3,oneof"`
}
type Privileges_CredentialSpec_Registry struct {
Registry string `protobuf:"bytes,2,opt,name=registry,proto3,oneof"`
}
func (*Privileges_CredentialSpec_File) isPrivileges_CredentialSpec_Source() {}
func (*Privileges_CredentialSpec_Registry) isPrivileges_CredentialSpec_Source() {}
func (m *Privileges_CredentialSpec) GetSource() isPrivileges_CredentialSpec_Source {
if m != nil {
return m.Source
}
return nil
}
func (m *Privileges_CredentialSpec) GetFile() string {
if x, ok := m.GetSource().(*Privileges_CredentialSpec_File); ok {
return x.File
}
return ""
}
func (m *Privileges_CredentialSpec) GetRegistry() string {
if x, ok := m.GetSource().(*Privileges_CredentialSpec_Registry); ok {
return x.Registry
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Privileges_CredentialSpec) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Privileges_CredentialSpec_OneofMarshaler, _Privileges_CredentialSpec_OneofUnmarshaler, _Privileges_CredentialSpec_OneofSizer, []interface{}{
(*Privileges_CredentialSpec_File)(nil),
(*Privileges_CredentialSpec_Registry)(nil),
}
}
func _Privileges_CredentialSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Privileges_CredentialSpec)
// source
switch x := m.Source.(type) {
case *Privileges_CredentialSpec_File:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
_ = b.EncodeStringBytes(x.File)
case *Privileges_CredentialSpec_Registry:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
_ = b.EncodeStringBytes(x.Registry)
case nil:
default:
return fmt.Errorf("Privileges_CredentialSpec.Source has unexpected type %T", x)
}
return nil
}
func _Privileges_CredentialSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Privileges_CredentialSpec)
switch tag {
case 1: // source.file
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Source = &Privileges_CredentialSpec_File{x}
return true, err
case 2: // source.registry
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Source = &Privileges_CredentialSpec_Registry{x}
return true, err
default:
return false, nil
}
}
func _Privileges_CredentialSpec_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Privileges_CredentialSpec)
// source
switch x := m.Source.(type) {
case *Privileges_CredentialSpec_File:
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.File)))
n += len(x.File)
case *Privileges_CredentialSpec_Registry:
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Registry)))
n += len(x.Registry)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// SELinuxContext contains the SELinux labels for the container.
type Privileges_SELinuxContext struct {
Disable bool `protobuf:"varint,1,opt,name=disable,proto3" json:"disable,omitempty"`
User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
Level string `protobuf:"bytes,5,opt,name=level,proto3" json:"level,omitempty"`
}
func (m *Privileges_SELinuxContext) Reset() { *m = Privileges_SELinuxContext{} }
func (*Privileges_SELinuxContext) ProtoMessage() {}
func (*Privileges_SELinuxContext) Descriptor() ([]byte, []int) {
return fileDescriptorTypes, []int{51, 1}
}
func init() {
proto.RegisterType((*Version)(nil), "docker.swarmkit.v1.Version")
proto.RegisterType((*IndexEntry)(nil), "docker.swarmkit.v1.IndexEntry")
proto.RegisterType((*Annotations)(nil), "docker.swarmkit.v1.Annotations")
proto.RegisterType((*Resources)(nil), "docker.swarmkit.v1.Resources")
proto.RegisterType((*ResourceRequirements)(nil), "docker.swarmkit.v1.ResourceRequirements")
proto.RegisterType((*Platform)(nil), "docker.swarmkit.v1.Platform")
proto.RegisterType((*PluginDescription)(nil), "docker.swarmkit.v1.PluginDescription")
proto.RegisterType((*EngineDescription)(nil), "docker.swarmkit.v1.EngineDescription")
proto.RegisterType((*NodeDescription)(nil), "docker.swarmkit.v1.NodeDescription")
proto.RegisterType((*NodeTLSInfo)(nil), "docker.swarmkit.v1.NodeTLSInfo")
proto.RegisterType((*RaftMemberStatus)(nil), "docker.swarmkit.v1.RaftMemberStatus")
proto.RegisterType((*NodeStatus)(nil), "docker.swarmkit.v1.NodeStatus")
proto.RegisterType((*Image)(nil), "docker.swarmkit.v1.Image")
proto.RegisterType((*Mount)(nil), "docker.swarmkit.v1.Mount")
proto.RegisterType((*Mount_BindOptions)(nil), "docker.swarmkit.v1.Mount.BindOptions")
proto.RegisterType((*Mount_VolumeOptions)(nil), "docker.swarmkit.v1.Mount.VolumeOptions")
proto.RegisterType((*Mount_TmpfsOptions)(nil), "docker.swarmkit.v1.Mount.TmpfsOptions")
proto.RegisterType((*RestartPolicy)(nil), "docker.swarmkit.v1.RestartPolicy")
proto.RegisterType((*UpdateConfig)(nil), "docker.swarmkit.v1.UpdateConfig")
proto.RegisterType((*UpdateStatus)(nil), "docker.swarmkit.v1.UpdateStatus")
proto.RegisterType((*ContainerStatus)(nil), "docker.swarmkit.v1.ContainerStatus")
proto.RegisterType((*PortStatus)(nil), "docker.swarmkit.v1.PortStatus")
proto.RegisterType((*TaskStatus)(nil), "docker.swarmkit.v1.TaskStatus")
proto.RegisterType((*NetworkAttachmentConfig)(nil), "docker.swarmkit.v1.NetworkAttachmentConfig")
proto.RegisterType((*IPAMConfig)(nil), "docker.swarmkit.v1.IPAMConfig")
proto.RegisterType((*PortConfig)(nil), "docker.swarmkit.v1.PortConfig")
proto.RegisterType((*Driver)(nil), "docker.swarmkit.v1.Driver")
proto.RegisterType((*IPAMOptions)(nil), "docker.swarmkit.v1.IPAMOptions")
proto.RegisterType((*Peer)(nil), "docker.swarmkit.v1.Peer")
proto.RegisterType((*WeightedPeer)(nil), "docker.swarmkit.v1.WeightedPeer")
proto.RegisterType((*IssuanceStatus)(nil), "docker.swarmkit.v1.IssuanceStatus")
proto.RegisterType((*AcceptancePolicy)(nil), "docker.swarmkit.v1.AcceptancePolicy")
proto.RegisterType((*AcceptancePolicy_RoleAdmissionPolicy)(nil), "docker.swarmkit.v1.AcceptancePolicy.RoleAdmissionPolicy")
proto.RegisterType((*AcceptancePolicy_RoleAdmissionPolicy_Secret)(nil), "docker.swarmkit.v1.AcceptancePolicy.RoleAdmissionPolicy.Secret")
proto.RegisterType((*ExternalCA)(nil), "docker.swarmkit.v1.ExternalCA")
proto.RegisterType((*CAConfig)(nil), "docker.swarmkit.v1.CAConfig")
proto.RegisterType((*OrchestrationConfig)(nil), "docker.swarmkit.v1.OrchestrationConfig")
proto.RegisterType((*TaskDefaults)(nil), "docker.swarmkit.v1.TaskDefaults")
proto.RegisterType((*DispatcherConfig)(nil), "docker.swarmkit.v1.DispatcherConfig")
proto.RegisterType((*RaftConfig)(nil), "docker.swarmkit.v1.RaftConfig")
proto.RegisterType((*EncryptionConfig)(nil), "docker.swarmkit.v1.EncryptionConfig")
proto.RegisterType((*SpreadOver)(nil), "docker.swarmkit.v1.SpreadOver")
proto.RegisterType((*PlacementPreference)(nil), "docker.swarmkit.v1.PlacementPreference")
proto.RegisterType((*Placement)(nil), "docker.swarmkit.v1.Placement")
proto.RegisterType((*JoinTokens)(nil), "docker.swarmkit.v1.JoinTokens")
proto.RegisterType((*RootCA)(nil), "docker.swarmkit.v1.RootCA")
proto.RegisterType((*Certificate)(nil), "docker.swarmkit.v1.Certificate")
proto.RegisterType((*EncryptionKey)(nil), "docker.swarmkit.v1.EncryptionKey")
proto.RegisterType((*ManagerStatus)(nil), "docker.swarmkit.v1.ManagerStatus")
proto.RegisterType((*FileTarget)(nil), "docker.swarmkit.v1.FileTarget")
proto.RegisterType((*SecretReference)(nil), "docker.swarmkit.v1.SecretReference")
proto.RegisterType((*ConfigReference)(nil), "docker.swarmkit.v1.ConfigReference")
proto.RegisterType((*BlacklistedCertificate)(nil), "docker.swarmkit.v1.BlacklistedCertificate")
proto.RegisterType((*HealthConfig)(nil), "docker.swarmkit.v1.HealthConfig")
proto.RegisterType((*MaybeEncryptedRecord)(nil), "docker.swarmkit.v1.MaybeEncryptedRecord")
proto.RegisterType((*RootRotation)(nil), "docker.swarmkit.v1.RootRotation")
proto.RegisterType((*Privileges)(nil), "docker.swarmkit.v1.Privileges")
proto.RegisterType((*Privileges_CredentialSpec)(nil), "docker.swarmkit.v1.Privileges.CredentialSpec")
proto.RegisterType((*Privileges_SELinuxContext)(nil), "docker.swarmkit.v1.Privileges.SELinuxContext")
proto.RegisterEnum("docker.swarmkit.v1.TaskState", TaskState_name, TaskState_value)
proto.RegisterEnum("docker.swarmkit.v1.NodeRole", NodeRole_name, NodeRole_value)
proto.RegisterEnum("docker.swarmkit.v1.RaftMemberStatus_Reachability", RaftMemberStatus_Reachability_name, RaftMemberStatus_Reachability_value)
proto.RegisterEnum("docker.swarmkit.v1.NodeStatus_State", NodeStatus_State_name, NodeStatus_State_value)
proto.RegisterEnum("docker.swarmkit.v1.Mount_MountType", Mount_MountType_name, Mount_MountType_value)
proto.RegisterEnum("docker.swarmkit.v1.Mount_BindOptions_MountPropagation", Mount_BindOptions_MountPropagation_name, Mount_BindOptions_MountPropagation_value)
proto.RegisterEnum("docker.swarmkit.v1.RestartPolicy_RestartCondition", RestartPolicy_RestartCondition_name, RestartPolicy_RestartCondition_value)
proto.RegisterEnum("docker.swarmkit.v1.UpdateConfig_FailureAction", UpdateConfig_FailureAction_name, UpdateConfig_FailureAction_value)
proto.RegisterEnum("docker.swarmkit.v1.UpdateConfig_UpdateOrder", UpdateConfig_UpdateOrder_name, UpdateConfig_UpdateOrder_value)
proto.RegisterEnum("docker.swarmkit.v1.UpdateStatus_UpdateState", UpdateStatus_UpdateState_name, UpdateStatus_UpdateState_value)
proto.RegisterEnum("docker.swarmkit.v1.IPAMConfig_AddressFamily", IPAMConfig_AddressFamily_name, IPAMConfig_AddressFamily_value)
proto.RegisterEnum("docker.swarmkit.v1.PortConfig_Protocol", PortConfig_Protocol_name, PortConfig_Protocol_value)
proto.RegisterEnum("docker.swarmkit.v1.PortConfig_PublishMode", PortConfig_PublishMode_name, PortConfig_PublishMode_value)
proto.RegisterEnum("docker.swarmkit.v1.IssuanceStatus_State", IssuanceStatus_State_name, IssuanceStatus_State_value)
proto.RegisterEnum("docker.swarmkit.v1.ExternalCA_CAProtocol", ExternalCA_CAProtocol_name, ExternalCA_CAProtocol_value)
proto.RegisterEnum("docker.swarmkit.v1.EncryptionKey_Algorithm", EncryptionKey_Algorithm_name, EncryptionKey_Algorithm_value)
proto.RegisterEnum("docker.swarmkit.v1.MaybeEncryptedRecord_Algorithm", MaybeEncryptedRecord_Algorithm_name, MaybeEncryptedRecord_Algorithm_value)
}
func (m *Version) Copy() *Version {
if m == nil {
return nil
}
o := &Version{}
o.CopyFrom(m)
return o
}
func (m *Version) CopyFrom(src interface{}) {
o := src.(*Version)
*m = *o
}
func (m *IndexEntry) Copy() *IndexEntry {
if m == nil {
return nil
}
o := &IndexEntry{}
o.CopyFrom(m)
return o
}
func (m *IndexEntry) CopyFrom(src interface{}) {
o := src.(*IndexEntry)
*m = *o
}
func (m *Annotations) Copy() *Annotations {
if m == nil {
return nil
}
o := &Annotations{}
o.CopyFrom(m)
return o
}
func (m *Annotations) CopyFrom(src interface{}) {
o := src.(*Annotations)
*m = *o
if o.Labels != nil {
m.Labels = make(map[string]string, len(o.Labels))
for k, v := range o.Labels {
m.Labels[k] = v
}
}
if o.Indices != nil {
m.Indices = make([]IndexEntry, len(o.Indices))
for i := range m.Indices {
github_com_docker_swarmkit_api_deepcopy.Copy(&m.Indices[i], &o.Indices[i])
}
}
}
func (m *Resources) Copy() *Resources {
if m == nil {
return nil
}
o := &Resources{}
o.CopyFrom(m)
return o
}
func (m *Resources) CopyFrom(src interface{}) {
o := src.(*Resources)
*m = *o
}
func (m *ResourceRequirements) Copy() *ResourceRequirements {
if m == nil {
return nil
}
o := &ResourceRequirements{}
o.CopyFrom(m)
return o
}
func (m *ResourceRequirements) CopyFrom(src interface{}) {
o := src.(*ResourceRequirements)
*m = *o
if o.Limits != nil {
m.Limits = &Resources{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Limits, o.Limits)
}
if o.Reservations != nil {
m.Reservations = &Resources{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Reservations, o.Reservations)
}
}
func (m *Platform) Copy() *Platform {
if m == nil {
return nil
}
o := &Platform{}
o.CopyFrom(m)
return o
}
func (m *Platform) CopyFrom(src interface{}) {
o := src.(*Platform)
*m = *o
}
func (m *PluginDescription) Copy() *PluginDescription {
if m == nil {
return nil
}
o := &PluginDescription{}
o.CopyFrom(m)
return o
}
func (m *PluginDescription) CopyFrom(src interface{}) {
o := src.(*PluginDescription)
*m = *o
}
func (m *EngineDescription) Copy() *EngineDescription {
if m == nil {
return nil
}
o := &EngineDescription{}
o.CopyFrom(m)
return o
}
func (m *EngineDescription) CopyFrom(src interface{}) {
o := src.(*EngineDescription)
*m = *o
if o.Labels != nil {
m.Labels = make(map[string]string, len(o.Labels))
for k, v := range o.Labels {
m.Labels[k] = v
}
}
if o.Plugins != nil {
m.Plugins = make([]PluginDescription, len(o.Plugins))
for i := range m.Plugins {
github_com_docker_swarmkit_api_deepcopy.Copy(&m.Plugins[i], &o.Plugins[i])
}
}
}
func (m *NodeDescription) Copy() *NodeDescription {
if m == nil {
return nil
}
o := &NodeDescription{}
o.CopyFrom(m)
return o
}
func (m *NodeDescription) CopyFrom(src interface{}) {
o := src.(*NodeDescription)
*m = *o
if o.Platform != nil {
m.Platform = &Platform{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Platform, o.Platform)
}
if o.Resources != nil {
m.Resources = &Resources{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Resources, o.Resources)
}
if o.Engine != nil {
m.Engine = &EngineDescription{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Engine, o.Engine)
}
if o.TLSInfo != nil {
m.TLSInfo = &NodeTLSInfo{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.TLSInfo, o.TLSInfo)
}
}
func (m *NodeTLSInfo) Copy() *NodeTLSInfo {
if m == nil {
return nil
}
o := &NodeTLSInfo{}
o.CopyFrom(m)
return o
}
func (m *NodeTLSInfo) CopyFrom(src interface{}) {
o := src.(*NodeTLSInfo)
*m = *o
if o.TrustRoot != nil {
m.TrustRoot = make([]byte, len(o.TrustRoot))
copy(m.TrustRoot, o.TrustRoot)
}
if o.CertIssuerSubject != nil {
m.CertIssuerSubject = make([]byte, len(o.CertIssuerSubject))
copy(m.CertIssuerSubject, o.CertIssuerSubject)
}
if o.CertIssuerPublicKey != nil {
m.CertIssuerPublicKey = make([]byte, len(o.CertIssuerPublicKey))
copy(m.CertIssuerPublicKey, o.CertIssuerPublicKey)
}
}
func (m *RaftMemberStatus) Copy() *RaftMemberStatus {
if m == nil {
return nil
}
o := &RaftMemberStatus{}
o.CopyFrom(m)
return o
}
func (m *RaftMemberStatus) CopyFrom(src interface{}) {
o := src.(*RaftMemberStatus)
*m = *o
}
func (m *NodeStatus) Copy() *NodeStatus {
if m == nil {
return nil
}
o := &NodeStatus{}
o.CopyFrom(m)
return o
}
func (m *NodeStatus) CopyFrom(src interface{}) {
o := src.(*NodeStatus)
*m = *o
}
func (m *Image) Copy() *Image {
if m == nil {
return nil
}
o := &Image{}
o.CopyFrom(m)
return o
}
func (m *Image) CopyFrom(src interface{}) {
o := src.(*Image)
*m = *o
}
func (m *Mount) Copy() *Mount {
if m == nil {
return nil
}
o := &Mount{}
o.CopyFrom(m)
return o
}
func (m *Mount) CopyFrom(src interface{}) {
o := src.(*Mount)
*m = *o
if o.BindOptions != nil {
m.BindOptions = &Mount_BindOptions{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.BindOptions, o.BindOptions)
}
if o.VolumeOptions != nil {
m.VolumeOptions = &Mount_VolumeOptions{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.VolumeOptions, o.VolumeOptions)
}
if o.TmpfsOptions != nil {
m.TmpfsOptions = &Mount_TmpfsOptions{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.TmpfsOptions, o.TmpfsOptions)
}
}
func (m *Mount_BindOptions) Copy() *Mount_BindOptions {
if m == nil {
return nil
}
o := &Mount_BindOptions{}
o.CopyFrom(m)
return o
}
func (m *Mount_BindOptions) CopyFrom(src interface{}) {
o := src.(*Mount_BindOptions)
*m = *o
}
func (m *Mount_VolumeOptions) Copy() *Mount_VolumeOptions {
if m == nil {
return nil
}
o := &Mount_VolumeOptions{}
o.CopyFrom(m)
return o
}
func (m *Mount_VolumeOptions) CopyFrom(src interface{}) {
o := src.(*Mount_VolumeOptions)
*m = *o
if o.Labels != nil {
m.Labels = make(map[string]string, len(o.Labels))
for k, v := range o.Labels {
m.Labels[k] = v
}
}
if o.DriverConfig != nil {
m.DriverConfig = &Driver{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.DriverConfig, o.DriverConfig)
}
}
func (m *Mount_TmpfsOptions) Copy() *Mount_TmpfsOptions {
if m == nil {
return nil
}
o := &Mount_TmpfsOptions{}
o.CopyFrom(m)
return o
}
func (m *Mount_TmpfsOptions) CopyFrom(src interface{}) {
o := src.(*Mount_TmpfsOptions)
*m = *o
}
func (m *RestartPolicy) Copy() *RestartPolicy {
if m == nil {
return nil
}
o := &RestartPolicy{}
o.CopyFrom(m)
return o
}
func (m *RestartPolicy) CopyFrom(src interface{}) {
o := src.(*RestartPolicy)
*m = *o
if o.Delay != nil {
m.Delay = &google_protobuf1.Duration{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Delay, o.Delay)
}
if o.Window != nil {
m.Window = &google_protobuf1.Duration{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Window, o.Window)
}
}
func (m *UpdateConfig) Copy() *UpdateConfig {
if m == nil {
return nil
}
o := &UpdateConfig{}
o.CopyFrom(m)
return o
}
func (m *UpdateConfig) CopyFrom(src interface{}) {
o := src.(*UpdateConfig)
*m = *o
github_com_docker_swarmkit_api_deepcopy.Copy(&m.Delay, &o.Delay)
if o.Monitor != nil {
m.Monitor = &google_protobuf1.Duration{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Monitor, o.Monitor)
}
}
func (m *UpdateStatus) Copy() *UpdateStatus {
if m == nil {
return nil
}
o := &UpdateStatus{}
o.CopyFrom(m)
return o
}
func (m *UpdateStatus) CopyFrom(src interface{}) {
o := src.(*UpdateStatus)
*m = *o
if o.StartedAt != nil {
m.StartedAt = &google_protobuf.Timestamp{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.StartedAt, o.StartedAt)
}
if o.CompletedAt != nil {
m.CompletedAt = &google_protobuf.Timestamp{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.CompletedAt, o.CompletedAt)
}
}
func (m *ContainerStatus) Copy() *ContainerStatus {
if m == nil {
return nil
}
o := &ContainerStatus{}
o.CopyFrom(m)
return o
}
func (m *ContainerStatus) CopyFrom(src interface{}) {
o := src.(*ContainerStatus)
*m = *o
}
func (m *PortStatus) Copy() *PortStatus {
if m == nil {
return nil
}
o := &PortStatus{}
o.CopyFrom(m)
return o
}
func (m *PortStatus) CopyFrom(src interface{}) {
o := src.(*PortStatus)
*m = *o
if o.Ports != nil {
m.Ports = make([]*PortConfig, len(o.Ports))
for i := range m.Ports {
m.Ports[i] = &PortConfig{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Ports[i], o.Ports[i])
}
}
}
func (m *TaskStatus) Copy() *TaskStatus {
if m == nil {
return nil
}
o := &TaskStatus{}
o.CopyFrom(m)
return o
}
func (m *TaskStatus) CopyFrom(src interface{}) {
o := src.(*TaskStatus)
*m = *o
if o.Timestamp != nil {
m.Timestamp = &google_protobuf.Timestamp{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Timestamp, o.Timestamp)
}
if o.PortStatus != nil {
m.PortStatus = &PortStatus{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.PortStatus, o.PortStatus)
}
if o.RuntimeStatus != nil {
switch o.RuntimeStatus.(type) {
case *TaskStatus_Container:
v := TaskStatus_Container{
Container: &ContainerStatus{},
}
github_com_docker_swarmkit_api_deepcopy.Copy(v.Container, o.GetContainer())
m.RuntimeStatus = &v
}
}
}
func (m *NetworkAttachmentConfig) Copy() *NetworkAttachmentConfig {
if m == nil {
return nil
}
o := &NetworkAttachmentConfig{}
o.CopyFrom(m)
return o
}
func (m *NetworkAttachmentConfig) CopyFrom(src interface{}) {
o := src.(*NetworkAttachmentConfig)
*m = *o
if o.Aliases != nil {
m.Aliases = make([]string, len(o.Aliases))
copy(m.Aliases, o.Aliases)
}
if o.Addresses != nil {
m.Addresses = make([]string, len(o.Addresses))
copy(m.Addresses, o.Addresses)
}
if o.DriverAttachmentOpts != nil {
m.DriverAttachmentOpts = make(map[string]string, len(o.DriverAttachmentOpts))
for k, v := range o.DriverAttachmentOpts {
m.DriverAttachmentOpts[k] = v
}
}
}
func (m *IPAMConfig) Copy() *IPAMConfig {
if m == nil {
return nil
}
o := &IPAMConfig{}
o.CopyFrom(m)
return o
}
func (m *IPAMConfig) CopyFrom(src interface{}) {
o := src.(*IPAMConfig)
*m = *o
if o.Reserved != nil {
m.Reserved = make(map[string]string, len(o.Reserved))
for k, v := range o.Reserved {
m.Reserved[k] = v
}
}
}
func (m *PortConfig) Copy() *PortConfig {
if m == nil {
return nil
}
o := &PortConfig{}
o.CopyFrom(m)
return o
}
func (m *PortConfig) CopyFrom(src interface{}) {
o := src.(*PortConfig)
*m = *o
}
func (m *Driver) Copy() *Driver {
if m == nil {
return nil
}
o := &Driver{}
o.CopyFrom(m)
return o
}
func (m *Driver) CopyFrom(src interface{}) {
o := src.(*Driver)
*m = *o
if o.Options != nil {
m.Options = make(map[string]string, len(o.Options))
for k, v := range o.Options {
m.Options[k] = v
}
}
}
func (m *IPAMOptions) Copy() *IPAMOptions {
if m == nil {
return nil
}
o := &IPAMOptions{}
o.CopyFrom(m)
return o
}
func (m *IPAMOptions) CopyFrom(src interface{}) {
o := src.(*IPAMOptions)
*m = *o
if o.Driver != nil {
m.Driver = &Driver{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Driver, o.Driver)
}
if o.Configs != nil {
m.Configs = make([]*IPAMConfig, len(o.Configs))
for i := range m.Configs {
m.Configs[i] = &IPAMConfig{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Configs[i], o.Configs[i])
}
}
}
func (m *Peer) Copy() *Peer {
if m == nil {
return nil
}
o := &Peer{}
o.CopyFrom(m)
return o
}
func (m *Peer) CopyFrom(src interface{}) {
o := src.(*Peer)
*m = *o
}
func (m *WeightedPeer) Copy() *WeightedPeer {
if m == nil {
return nil
}
o := &WeightedPeer{}
o.CopyFrom(m)
return o
}
func (m *WeightedPeer) CopyFrom(src interface{}) {
o := src.(*WeightedPeer)
*m = *o
if o.Peer != nil {
m.Peer = &Peer{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Peer, o.Peer)
}
}
func (m *IssuanceStatus) Copy() *IssuanceStatus {
if m == nil {
return nil
}
o := &IssuanceStatus{}
o.CopyFrom(m)
return o
}
func (m *IssuanceStatus) CopyFrom(src interface{}) {
o := src.(*IssuanceStatus)
*m = *o
}
func (m *AcceptancePolicy) Copy() *AcceptancePolicy {
if m == nil {
return nil
}
o := &AcceptancePolicy{}
o.CopyFrom(m)
return o
}
func (m *AcceptancePolicy) CopyFrom(src interface{}) {
o := src.(*AcceptancePolicy)
*m = *o
if o.Policies != nil {
m.Policies = make([]*AcceptancePolicy_RoleAdmissionPolicy, len(o.Policies))
for i := range m.Policies {
m.Policies[i] = &AcceptancePolicy_RoleAdmissionPolicy{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Policies[i], o.Policies[i])
}
}
}
func (m *AcceptancePolicy_RoleAdmissionPolicy) Copy() *AcceptancePolicy_RoleAdmissionPolicy {
if m == nil {
return nil
}
o := &AcceptancePolicy_RoleAdmissionPolicy{}
o.CopyFrom(m)
return o
}
func (m *AcceptancePolicy_RoleAdmissionPolicy) CopyFrom(src interface{}) {
o := src.(*AcceptancePolicy_RoleAdmissionPolicy)
*m = *o
if o.Secret != nil {
m.Secret = &AcceptancePolicy_RoleAdmissionPolicy_Secret{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Secret, o.Secret)
}
}
func (m *AcceptancePolicy_RoleAdmissionPolicy_Secret) Copy() *AcceptancePolicy_RoleAdmissionPolicy_Secret {
if m == nil {
return nil
}
o := &AcceptancePolicy_RoleAdmissionPolicy_Secret{}
o.CopyFrom(m)
return o
}
func (m *AcceptancePolicy_RoleAdmissionPolicy_Secret) CopyFrom(src interface{}) {
o := src.(*AcceptancePolicy_RoleAdmissionPolicy_Secret)
*m = *o
if o.Data != nil {
m.Data = make([]byte, len(o.Data))
copy(m.Data, o.Data)
}
}
func (m *ExternalCA) Copy() *ExternalCA {
if m == nil {
return nil
}
o := &ExternalCA{}
o.CopyFrom(m)
return o
}
func (m *ExternalCA) CopyFrom(src interface{}) {
o := src.(*ExternalCA)
*m = *o
if o.Options != nil {
m.Options = make(map[string]string, len(o.Options))
for k, v := range o.Options {
m.Options[k] = v
}
}
if o.CACert != nil {
m.CACert = make([]byte, len(o.CACert))
copy(m.CACert, o.CACert)
}
}
func (m *CAConfig) Copy() *CAConfig {
if m == nil {
return nil
}
o := &CAConfig{}
o.CopyFrom(m)
return o
}
func (m *CAConfig) CopyFrom(src interface{}) {
o := src.(*CAConfig)
*m = *o
if o.NodeCertExpiry != nil {
m.NodeCertExpiry = &google_protobuf1.Duration{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.NodeCertExpiry, o.NodeCertExpiry)
}
if o.ExternalCAs != nil {
m.ExternalCAs = make([]*ExternalCA, len(o.ExternalCAs))
for i := range m.ExternalCAs {
m.ExternalCAs[i] = &ExternalCA{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.ExternalCAs[i], o.ExternalCAs[i])
}
}
if o.SigningCACert != nil {
m.SigningCACert = make([]byte, len(o.SigningCACert))
copy(m.SigningCACert, o.SigningCACert)
}
if o.SigningCAKey != nil {
m.SigningCAKey = make([]byte, len(o.SigningCAKey))
copy(m.SigningCAKey, o.SigningCAKey)
}
}
func (m *OrchestrationConfig) Copy() *OrchestrationConfig {
if m == nil {
return nil
}
o := &OrchestrationConfig{}
o.CopyFrom(m)
return o
}
func (m *OrchestrationConfig) CopyFrom(src interface{}) {
o := src.(*OrchestrationConfig)
*m = *o
}
func (m *TaskDefaults) Copy() *TaskDefaults {
if m == nil {
return nil
}
o := &TaskDefaults{}
o.CopyFrom(m)
return o
}
func (m *TaskDefaults) CopyFrom(src interface{}) {
o := src.(*TaskDefaults)
*m = *o
if o.LogDriver != nil {
m.LogDriver = &Driver{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.LogDriver, o.LogDriver)
}
}
func (m *DispatcherConfig) Copy() *DispatcherConfig {
if m == nil {
return nil
}
o := &DispatcherConfig{}
o.CopyFrom(m)
return o
}
func (m *DispatcherConfig) CopyFrom(src interface{}) {
o := src.(*DispatcherConfig)
*m = *o
if o.HeartbeatPeriod != nil {
m.HeartbeatPeriod = &google_protobuf1.Duration{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.HeartbeatPeriod, o.HeartbeatPeriod)
}
}
func (m *RaftConfig) Copy() *RaftConfig {
if m == nil {
return nil
}
o := &RaftConfig{}
o.CopyFrom(m)
return o
}
func (m *RaftConfig) CopyFrom(src interface{}) {
o := src.(*RaftConfig)
*m = *o
}
func (m *EncryptionConfig) Copy() *EncryptionConfig {
if m == nil {
return nil
}
o := &EncryptionConfig{}
o.CopyFrom(m)
return o
}
func (m *EncryptionConfig) CopyFrom(src interface{}) {
o := src.(*EncryptionConfig)
*m = *o
}
func (m *SpreadOver) Copy() *SpreadOver {
if m == nil {
return nil
}
o := &SpreadOver{}
o.CopyFrom(m)
return o
}
func (m *SpreadOver) CopyFrom(src interface{}) {
o := src.(*SpreadOver)
*m = *o
}
func (m *PlacementPreference) Copy() *PlacementPreference {
if m == nil {
return nil
}
o := &PlacementPreference{}
o.CopyFrom(m)
return o
}
func (m *PlacementPreference) CopyFrom(src interface{}) {
o := src.(*PlacementPreference)
*m = *o
if o.Preference != nil {
switch o.Preference.(type) {
case *PlacementPreference_Spread:
v := PlacementPreference_Spread{
Spread: &SpreadOver{},
}
github_com_docker_swarmkit_api_deepcopy.Copy(v.Spread, o.GetSpread())
m.Preference = &v
}
}
}
func (m *Placement) Copy() *Placement {
if m == nil {
return nil
}
o := &Placement{}
o.CopyFrom(m)
return o
}
func (m *Placement) CopyFrom(src interface{}) {
o := src.(*Placement)
*m = *o
if o.Constraints != nil {
m.Constraints = make([]string, len(o.Constraints))
copy(m.Constraints, o.Constraints)
}
if o.Preferences != nil {
m.Preferences = make([]*PlacementPreference, len(o.Preferences))
for i := range m.Preferences {
m.Preferences[i] = &PlacementPreference{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Preferences[i], o.Preferences[i])
}
}
if o.Platforms != nil {
m.Platforms = make([]*Platform, len(o.Platforms))
for i := range m.Platforms {
m.Platforms[i] = &Platform{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Platforms[i], o.Platforms[i])
}
}
}
func (m *JoinTokens) Copy() *JoinTokens {
if m == nil {
return nil
}
o := &JoinTokens{}
o.CopyFrom(m)
return o
}
func (m *JoinTokens) CopyFrom(src interface{}) {
o := src.(*JoinTokens)
*m = *o
}
func (m *RootCA) Copy() *RootCA {
if m == nil {
return nil
}
o := &RootCA{}
o.CopyFrom(m)
return o
}
func (m *RootCA) CopyFrom(src interface{}) {
o := src.(*RootCA)
*m = *o
if o.CAKey != nil {
m.CAKey = make([]byte, len(o.CAKey))
copy(m.CAKey, o.CAKey)
}
if o.CACert != nil {
m.CACert = make([]byte, len(o.CACert))
copy(m.CACert, o.CACert)
}
github_com_docker_swarmkit_api_deepcopy.Copy(&m.JoinTokens, &o.JoinTokens)
if o.RootRotation != nil {
m.RootRotation = &RootRotation{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.RootRotation, o.RootRotation)
}
}
func (m *Certificate) Copy() *Certificate {
if m == nil {
return nil
}
o := &Certificate{}
o.CopyFrom(m)
return o
}
func (m *Certificate) CopyFrom(src interface{}) {
o := src.(*Certificate)
*m = *o
if o.CSR != nil {
m.CSR = make([]byte, len(o.CSR))
copy(m.CSR, o.CSR)
}
github_com_docker_swarmkit_api_deepcopy.Copy(&m.Status, &o.Status)
if o.Certificate != nil {
m.Certificate = make([]byte, len(o.Certificate))
copy(m.Certificate, o.Certificate)
}
}
func (m *EncryptionKey) Copy() *EncryptionKey {
if m == nil {
return nil
}
o := &EncryptionKey{}
o.CopyFrom(m)
return o
}
func (m *EncryptionKey) CopyFrom(src interface{}) {
o := src.(*EncryptionKey)
*m = *o
if o.Key != nil {
m.Key = make([]byte, len(o.Key))
copy(m.Key, o.Key)
}
}
func (m *ManagerStatus) Copy() *ManagerStatus {
if m == nil {
return nil
}
o := &ManagerStatus{}
o.CopyFrom(m)
return o
}
func (m *ManagerStatus) CopyFrom(src interface{}) {
o := src.(*ManagerStatus)
*m = *o
}
func (m *FileTarget) Copy() *FileTarget {
if m == nil {
return nil
}
o := &FileTarget{}
o.CopyFrom(m)
return o
}
func (m *FileTarget) CopyFrom(src interface{}) {
o := src.(*FileTarget)
*m = *o
}
func (m *SecretReference) Copy() *SecretReference {
if m == nil {
return nil
}
o := &SecretReference{}
o.CopyFrom(m)
return o
}
func (m *SecretReference) CopyFrom(src interface{}) {
o := src.(*SecretReference)
*m = *o
if o.Target != nil {
switch o.Target.(type) {
case *SecretReference_File:
v := SecretReference_File{
File: &FileTarget{},
}
github_com_docker_swarmkit_api_deepcopy.Copy(v.File, o.GetFile())
m.Target = &v
}
}
}
func (m *ConfigReference) Copy() *ConfigReference {
if m == nil {
return nil
}
o := &ConfigReference{}
o.CopyFrom(m)
return o
}
func (m *ConfigReference) CopyFrom(src interface{}) {
o := src.(*ConfigReference)
*m = *o
if o.Target != nil {
switch o.Target.(type) {
case *ConfigReference_File:
v := ConfigReference_File{
File: &FileTarget{},
}
github_com_docker_swarmkit_api_deepcopy.Copy(v.File, o.GetFile())
m.Target = &v
}
}
}
func (m *BlacklistedCertificate) Copy() *BlacklistedCertificate {
if m == nil {
return nil
}
o := &BlacklistedCertificate{}
o.CopyFrom(m)
return o
}
func (m *BlacklistedCertificate) CopyFrom(src interface{}) {
o := src.(*BlacklistedCertificate)
*m = *o
if o.Expiry != nil {
m.Expiry = &google_protobuf.Timestamp{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Expiry, o.Expiry)
}
}
func (m *HealthConfig) Copy() *HealthConfig {
if m == nil {
return nil
}
o := &HealthConfig{}
o.CopyFrom(m)
return o
}
func (m *HealthConfig) CopyFrom(src interface{}) {
o := src.(*HealthConfig)
*m = *o
if o.Test != nil {
m.Test = make([]string, len(o.Test))
copy(m.Test, o.Test)
}
if o.Interval != nil {
m.Interval = &google_protobuf1.Duration{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Interval, o.Interval)
}
if o.Timeout != nil {
m.Timeout = &google_protobuf1.Duration{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.Timeout, o.Timeout)
}
if o.StartPeriod != nil {
m.StartPeriod = &google_protobuf1.Duration{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.StartPeriod, o.StartPeriod)
}
}
func (m *MaybeEncryptedRecord) Copy() *MaybeEncryptedRecord {
if m == nil {
return nil
}
o := &MaybeEncryptedRecord{}
o.CopyFrom(m)
return o
}
func (m *MaybeEncryptedRecord) CopyFrom(src interface{}) {
o := src.(*MaybeEncryptedRecord)
*m = *o
if o.Data != nil {
m.Data = make([]byte, len(o.Data))
copy(m.Data, o.Data)
}
if o.Nonce != nil {
m.Nonce = make([]byte, len(o.Nonce))
copy(m.Nonce, o.Nonce)
}
}
func (m *RootRotation) Copy() *RootRotation {
if m == nil {
return nil
}
o := &RootRotation{}
o.CopyFrom(m)
return o
}
func (m *RootRotation) CopyFrom(src interface{}) {
o := src.(*RootRotation)
*m = *o
if o.CACert != nil {
m.CACert = make([]byte, len(o.CACert))
copy(m.CACert, o.CACert)
}
if o.CAKey != nil {
m.CAKey = make([]byte, len(o.CAKey))
copy(m.CAKey, o.CAKey)
}
if o.CrossSignedCACert != nil {
m.CrossSignedCACert = make([]byte, len(o.CrossSignedCACert))
copy(m.CrossSignedCACert, o.CrossSignedCACert)
}
}
func (m *Privileges) Copy() *Privileges {
if m == nil {
return nil
}
o := &Privileges{}
o.CopyFrom(m)
return o
}
func (m *Privileges) CopyFrom(src interface{}) {
o := src.(*Privileges)
*m = *o
if o.CredentialSpec != nil {
m.CredentialSpec = &Privileges_CredentialSpec{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.CredentialSpec, o.CredentialSpec)
}
if o.SELinuxContext != nil {
m.SELinuxContext = &Privileges_SELinuxContext{}
github_com_docker_swarmkit_api_deepcopy.Copy(m.SELinuxContext, o.SELinuxContext)
}
}
func (m *Privileges_CredentialSpec) Copy() *Privileges_CredentialSpec {
if m == nil {
return nil
}
o := &Privileges_CredentialSpec{}
o.CopyFrom(m)
return o
}
func (m *Privileges_CredentialSpec) CopyFrom(src interface{}) {
o := src.(*Privileges_CredentialSpec)
*m = *o
if o.Source != nil {
switch o.Source.(type) {
case *Privileges_CredentialSpec_File:
v := Privileges_CredentialSpec_File{
File: o.GetFile(),
}
m.Source = &v
case *Privileges_CredentialSpec_Registry:
v := Privileges_CredentialSpec_Registry{
Registry: o.GetRegistry(),
}
m.Source = &v
}
}
}
func (m *Privileges_SELinuxContext) Copy() *Privileges_SELinuxContext {
if m == nil {
return nil
}
o := &Privileges_SELinuxContext{}
o.CopyFrom(m)
return o
}
func (m *Privileges_SELinuxContext) CopyFrom(src interface{}) {
o := src.(*Privileges_SELinuxContext)
*m = *o
}
func (m *Version) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Version) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Index != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Index))
}
return i, nil
}
func (m *IndexEntry) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *IndexEntry) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Key) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
if len(m.Val) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Val)))
i += copy(dAtA[i:], m.Val)
}
return i, nil
}
func (m *Annotations) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Annotations) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.Labels) > 0 {
for k, _ := range m.Labels {
dAtA[i] = 0x12
i++
v := m.Labels[k]
mapSize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
i = encodeVarintTypes(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
if len(m.Indices) > 0 {
for _, msg := range m.Indices {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *Resources) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Resources) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.NanoCPUs != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.NanoCPUs))
}
if m.MemoryBytes != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.MemoryBytes))
}
return i, nil
}
func (m *ResourceRequirements) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ResourceRequirements) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Limits != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Limits.Size()))
n1, err := m.Limits.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
}
if m.Reservations != nil {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Reservations.Size()))
n2, err := m.Reservations.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n2
}
return i, nil
}
func (m *Platform) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Platform) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Architecture) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Architecture)))
i += copy(dAtA[i:], m.Architecture)
}
if len(m.OS) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.OS)))
i += copy(dAtA[i:], m.OS)
}
return i, nil
}
func (m *PluginDescription) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PluginDescription) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Type) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
i += copy(dAtA[i:], m.Type)
}
if len(m.Name) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
return i, nil
}
func (m *EngineDescription) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *EngineDescription) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.EngineVersion) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.EngineVersion)))
i += copy(dAtA[i:], m.EngineVersion)
}
if len(m.Labels) > 0 {
for k, _ := range m.Labels {
dAtA[i] = 0x12
i++
v := m.Labels[k]
mapSize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
i = encodeVarintTypes(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
if len(m.Plugins) > 0 {
for _, msg := range m.Plugins {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *NodeDescription) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NodeDescription) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Hostname) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Hostname)))
i += copy(dAtA[i:], m.Hostname)
}
if m.Platform != nil {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Platform.Size()))
n3, err := m.Platform.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
if m.Resources != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Resources.Size()))
n4, err := m.Resources.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n4
}
if m.Engine != nil {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Engine.Size()))
n5, err := m.Engine.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n5
}
if m.TLSInfo != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.TLSInfo.Size()))
n6, err := m.TLSInfo.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n6
}
return i, nil
}
func (m *NodeTLSInfo) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NodeTLSInfo) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.TrustRoot) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.TrustRoot)))
i += copy(dAtA[i:], m.TrustRoot)
}
if len(m.CertIssuerSubject) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CertIssuerSubject)))
i += copy(dAtA[i:], m.CertIssuerSubject)
}
if len(m.CertIssuerPublicKey) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CertIssuerPublicKey)))
i += copy(dAtA[i:], m.CertIssuerPublicKey)
}
return i, nil
}
func (m *RaftMemberStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RaftMemberStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Leader {
dAtA[i] = 0x8
i++
if m.Leader {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if m.Reachability != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Reachability))
}
if len(m.Message) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
i += copy(dAtA[i:], m.Message)
}
return i, nil
}
func (m *NodeStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.State != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.State))
}
if len(m.Message) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
i += copy(dAtA[i:], m.Message)
}
if len(m.Addr) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Addr)))
i += copy(dAtA[i:], m.Addr)
}
return i, nil
}
func (m *Image) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Image) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Reference) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Reference)))
i += copy(dAtA[i:], m.Reference)
}
return i, nil
}
func (m *Mount) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Mount) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Type != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Type))
}
if len(m.Source) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Source)))
i += copy(dAtA[i:], m.Source)
}
if len(m.Target) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Target)))
i += copy(dAtA[i:], m.Target)
}
if m.ReadOnly {
dAtA[i] = 0x20
i++
if m.ReadOnly {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if m.BindOptions != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.BindOptions.Size()))
n7, err := m.BindOptions.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n7
}
if m.VolumeOptions != nil {
dAtA[i] = 0x32
i++
i = encodeVarintTypes(dAtA, i, uint64(m.VolumeOptions.Size()))
n8, err := m.VolumeOptions.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n8
}
if m.TmpfsOptions != nil {
dAtA[i] = 0x3a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.TmpfsOptions.Size()))
n9, err := m.TmpfsOptions.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n9
}
return i, nil
}
func (m *Mount_BindOptions) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Mount_BindOptions) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Propagation != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Propagation))
}
return i, nil
}
func (m *Mount_VolumeOptions) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Mount_VolumeOptions) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.NoCopy {
dAtA[i] = 0x8
i++
if m.NoCopy {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if len(m.Labels) > 0 {
for k, _ := range m.Labels {
dAtA[i] = 0x12
i++
v := m.Labels[k]
mapSize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
i = encodeVarintTypes(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
if m.DriverConfig != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.DriverConfig.Size()))
n10, err := m.DriverConfig.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n10
}
return i, nil
}
func (m *Mount_TmpfsOptions) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Mount_TmpfsOptions) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.SizeBytes != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.SizeBytes))
}
if m.Mode != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Mode))
}
return i, nil
}
func (m *RestartPolicy) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RestartPolicy) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Condition != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Condition))
}
if m.Delay != nil {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Delay.Size()))
n11, err := m.Delay.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n11
}
if m.MaxAttempts != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintTypes(dAtA, i, uint64(m.MaxAttempts))
}
if m.Window != nil {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Window.Size()))
n12, err := m.Window.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n12
}
return i, nil
}
func (m *UpdateConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *UpdateConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Parallelism != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Parallelism))
}
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Delay)))
n13, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Delay, dAtA[i:])
if err != nil {
return 0, err
}
i += n13
if m.FailureAction != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintTypes(dAtA, i, uint64(m.FailureAction))
}
if m.Monitor != nil {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Monitor.Size()))
n14, err := m.Monitor.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n14
}
if m.MaxFailureRatio != 0 {
dAtA[i] = 0x2d
i++
i = encodeFixed32Types(dAtA, i, uint32(math.Float32bits(float32(m.MaxFailureRatio))))
}
if m.Order != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Order))
}
return i, nil
}
func (m *UpdateStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *UpdateStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.State != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.State))
}
if m.StartedAt != nil {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(m.StartedAt.Size()))
n15, err := m.StartedAt.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n15
}
if m.CompletedAt != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.CompletedAt.Size()))
n16, err := m.CompletedAt.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n16
}
if len(m.Message) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
i += copy(dAtA[i:], m.Message)
}
return i, nil
}
func (m *ContainerStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ContainerStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ContainerID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID)
}
if m.PID != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.PID))
}
if m.ExitCode != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintTypes(dAtA, i, uint64(m.ExitCode))
}
return i, nil
}
func (m *PortStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PortStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Ports) > 0 {
for _, msg := range m.Ports {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *TaskStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *TaskStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Timestamp != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size()))
n17, err := m.Timestamp.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n17
}
if m.State != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.State))
}
if len(m.Message) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
i += copy(dAtA[i:], m.Message)
}
if len(m.Err) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Err)))
i += copy(dAtA[i:], m.Err)
}
if m.RuntimeStatus != nil {
nn18, err := m.RuntimeStatus.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += nn18
}
if m.PortStatus != nil {
dAtA[i] = 0x32
i++
i = encodeVarintTypes(dAtA, i, uint64(m.PortStatus.Size()))
n19, err := m.PortStatus.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n19
}
return i, nil
}
func (m *TaskStatus_Container) MarshalTo(dAtA []byte) (int, error) {
i := 0
if m.Container != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Container.Size()))
n20, err := m.Container.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n20
}
return i, nil
}
func (m *NetworkAttachmentConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NetworkAttachmentConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Target) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Target)))
i += copy(dAtA[i:], m.Target)
}
if len(m.Aliases) > 0 {
for _, s := range m.Aliases {
dAtA[i] = 0x12
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if len(m.Addresses) > 0 {
for _, s := range m.Addresses {
dAtA[i] = 0x1a
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if len(m.DriverAttachmentOpts) > 0 {
for k, _ := range m.DriverAttachmentOpts {
dAtA[i] = 0x22
i++
v := m.DriverAttachmentOpts[k]
mapSize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
i = encodeVarintTypes(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
return i, nil
}
func (m *IPAMConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *IPAMConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Family != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Family))
}
if len(m.Subnet) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Subnet)))
i += copy(dAtA[i:], m.Subnet)
}
if len(m.Range) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Range)))
i += copy(dAtA[i:], m.Range)
}
if len(m.Gateway) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Gateway)))
i += copy(dAtA[i:], m.Gateway)
}
if len(m.Reserved) > 0 {
for k, _ := range m.Reserved {
dAtA[i] = 0x2a
i++
v := m.Reserved[k]
mapSize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
i = encodeVarintTypes(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
return i, nil
}
func (m *PortConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PortConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if m.Protocol != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Protocol))
}
if m.TargetPort != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintTypes(dAtA, i, uint64(m.TargetPort))
}
if m.PublishedPort != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintTypes(dAtA, i, uint64(m.PublishedPort))
}
if m.PublishMode != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintTypes(dAtA, i, uint64(m.PublishMode))
}
return i, nil
}
func (m *Driver) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Driver) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.Options) > 0 {
for k, _ := range m.Options {
dAtA[i] = 0x12
i++
v := m.Options[k]
mapSize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
i = encodeVarintTypes(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
return i, nil
}
func (m *IPAMOptions) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *IPAMOptions) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Driver != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Driver.Size()))
n21, err := m.Driver.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n21
}
if len(m.Configs) > 0 {
for _, msg := range m.Configs {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *Peer) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Peer) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.NodeID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.NodeID)))
i += copy(dAtA[i:], m.NodeID)
}
if len(m.Addr) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Addr)))
i += copy(dAtA[i:], m.Addr)
}
return i, nil
}
func (m *WeightedPeer) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *WeightedPeer) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Peer != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Peer.Size()))
n22, err := m.Peer.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n22
}
if m.Weight != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Weight))
}
return i, nil
}
func (m *IssuanceStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *IssuanceStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.State != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.State))
}
if len(m.Err) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Err)))
i += copy(dAtA[i:], m.Err)
}
return i, nil
}
func (m *AcceptancePolicy) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AcceptancePolicy) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Policies) > 0 {
for _, msg := range m.Policies {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *AcceptancePolicy_RoleAdmissionPolicy) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AcceptancePolicy_RoleAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Role != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Role))
}
if m.Autoaccept {
dAtA[i] = 0x10
i++
if m.Autoaccept {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if m.Secret != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Secret.Size()))
n23, err := m.Secret.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n23
}
return i, nil
}
func (m *AcceptancePolicy_RoleAdmissionPolicy_Secret) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AcceptancePolicy_RoleAdmissionPolicy_Secret) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Data) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
i += copy(dAtA[i:], m.Data)
}
if len(m.Alg) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Alg)))
i += copy(dAtA[i:], m.Alg)
}
return i, nil
}
func (m *ExternalCA) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ExternalCA) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Protocol != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Protocol))
}
if len(m.URL) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.URL)))
i += copy(dAtA[i:], m.URL)
}
if len(m.Options) > 0 {
for k, _ := range m.Options {
dAtA[i] = 0x1a
i++
v := m.Options[k]
mapSize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
i = encodeVarintTypes(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
if len(m.CACert) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CACert)))
i += copy(dAtA[i:], m.CACert)
}
return i, nil
}
func (m *CAConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *CAConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.NodeCertExpiry != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.NodeCertExpiry.Size()))
n24, err := m.NodeCertExpiry.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n24
}
if len(m.ExternalCAs) > 0 {
for _, msg := range m.ExternalCAs {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.SigningCACert) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.SigningCACert)))
i += copy(dAtA[i:], m.SigningCACert)
}
if len(m.SigningCAKey) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.SigningCAKey)))
i += copy(dAtA[i:], m.SigningCAKey)
}
if m.ForceRotate != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintTypes(dAtA, i, uint64(m.ForceRotate))
}
return i, nil
}
func (m *OrchestrationConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *OrchestrationConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.TaskHistoryRetentionLimit != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.TaskHistoryRetentionLimit))
}
return i, nil
}
func (m *TaskDefaults) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *TaskDefaults) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.LogDriver != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.LogDriver.Size()))
n25, err := m.LogDriver.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n25
}
return i, nil
}
func (m *DispatcherConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DispatcherConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.HeartbeatPeriod != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.HeartbeatPeriod.Size()))
n26, err := m.HeartbeatPeriod.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n26
}
return i, nil
}
func (m *RaftConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RaftConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.SnapshotInterval != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.SnapshotInterval))
}
if m.KeepOldSnapshots != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.KeepOldSnapshots))
}
if m.LogEntriesForSlowFollowers != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintTypes(dAtA, i, uint64(m.LogEntriesForSlowFollowers))
}
if m.HeartbeatTick != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintTypes(dAtA, i, uint64(m.HeartbeatTick))
}
if m.ElectionTick != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintTypes(dAtA, i, uint64(m.ElectionTick))
}
return i, nil
}
func (m *EncryptionConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *EncryptionConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.AutoLockManagers {
dAtA[i] = 0x8
i++
if m.AutoLockManagers {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
return i, nil
}
func (m *SpreadOver) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *SpreadOver) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.SpreadDescriptor) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.SpreadDescriptor)))
i += copy(dAtA[i:], m.SpreadDescriptor)
}
return i, nil
}
func (m *PlacementPreference) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PlacementPreference) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Preference != nil {
nn27, err := m.Preference.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += nn27
}
return i, nil
}
func (m *PlacementPreference_Spread) MarshalTo(dAtA []byte) (int, error) {
i := 0
if m.Spread != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Spread.Size()))
n28, err := m.Spread.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n28
}
return i, nil
}
func (m *Placement) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Placement) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Constraints) > 0 {
for _, s := range m.Constraints {
dAtA[i] = 0xa
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if len(m.Preferences) > 0 {
for _, msg := range m.Preferences {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Platforms) > 0 {
for _, msg := range m.Platforms {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *JoinTokens) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *JoinTokens) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Worker) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Worker)))
i += copy(dAtA[i:], m.Worker)
}
if len(m.Manager) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Manager)))
i += copy(dAtA[i:], m.Manager)
}
return i, nil
}
func (m *RootCA) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RootCA) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.CAKey) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CAKey)))
i += copy(dAtA[i:], m.CAKey)
}
if len(m.CACert) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CACert)))
i += copy(dAtA[i:], m.CACert)
}
if len(m.CACertHash) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CACertHash)))
i += copy(dAtA[i:], m.CACertHash)
}
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(m.JoinTokens.Size()))
n29, err := m.JoinTokens.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n29
if m.RootRotation != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.RootRotation.Size()))
n30, err := m.RootRotation.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n30
}
if m.LastForcedRotation != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintTypes(dAtA, i, uint64(m.LastForcedRotation))
}
return i, nil
}
func (m *Certificate) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Certificate) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Role != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Role))
}
if len(m.CSR) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CSR)))
i += copy(dAtA[i:], m.CSR)
}
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Status.Size()))
n31, err := m.Status.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n31
if len(m.Certificate) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Certificate)))
i += copy(dAtA[i:], m.Certificate)
}
if len(m.CN) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CN)))
i += copy(dAtA[i:], m.CN)
}
return i, nil
}
func (m *EncryptionKey) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *EncryptionKey) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Subsystem) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Subsystem)))
i += copy(dAtA[i:], m.Subsystem)
}
if m.Algorithm != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Algorithm))
}
if len(m.Key) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
if m.LamportTime != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintTypes(dAtA, i, uint64(m.LamportTime))
}
return i, nil
}
func (m *ManagerStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ManagerStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.RaftID != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.RaftID))
}
if len(m.Addr) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Addr)))
i += copy(dAtA[i:], m.Addr)
}
if m.Leader {
dAtA[i] = 0x18
i++
if m.Leader {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if m.Reachability != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Reachability))
}
return i, nil
}
func (m *FileTarget) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *FileTarget) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.UID) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.UID)))
i += copy(dAtA[i:], m.UID)
}
if len(m.GID) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.GID)))
i += copy(dAtA[i:], m.GID)
}
if m.Mode != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Mode))
}
return i, nil
}
func (m *SecretReference) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *SecretReference) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.SecretID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.SecretID)))
i += copy(dAtA[i:], m.SecretID)
}
if len(m.SecretName) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.SecretName)))
i += copy(dAtA[i:], m.SecretName)
}
if m.Target != nil {
nn32, err := m.Target.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += nn32
}
return i, nil
}
func (m *SecretReference_File) MarshalTo(dAtA []byte) (int, error) {
i := 0
if m.File != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.File.Size()))
n33, err := m.File.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n33
}
return i, nil
}
func (m *ConfigReference) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ConfigReference) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.ConfigID) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.ConfigID)))
i += copy(dAtA[i:], m.ConfigID)
}
if len(m.ConfigName) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.ConfigName)))
i += copy(dAtA[i:], m.ConfigName)
}
if m.Target != nil {
nn34, err := m.Target.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += nn34
}
return i, nil
}
func (m *ConfigReference_File) MarshalTo(dAtA []byte) (int, error) {
i := 0
if m.File != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.File.Size()))
n35, err := m.File.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n35
}
return i, nil
}
func (m *BlacklistedCertificate) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *BlacklistedCertificate) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Expiry != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Expiry.Size()))
n36, err := m.Expiry.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n36
}
return i, nil
}
func (m *HealthConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *HealthConfig) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Test) > 0 {
for _, s := range m.Test {
dAtA[i] = 0xa
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if m.Interval != nil {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Interval.Size()))
n37, err := m.Interval.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n37
}
if m.Timeout != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Timeout.Size()))
n38, err := m.Timeout.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n38
}
if m.Retries != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Retries))
}
if m.StartPeriod != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintTypes(dAtA, i, uint64(m.StartPeriod.Size()))
n39, err := m.StartPeriod.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n39
}
return i, nil
}
func (m *MaybeEncryptedRecord) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MaybeEncryptedRecord) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Algorithm != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintTypes(dAtA, i, uint64(m.Algorithm))
}
if len(m.Data) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
i += copy(dAtA[i:], m.Data)
}
if len(m.Nonce) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Nonce)))
i += copy(dAtA[i:], m.Nonce)
}
return i, nil
}
func (m *RootRotation) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RootRotation) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.CACert) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CACert)))
i += copy(dAtA[i:], m.CACert)
}
if len(m.CAKey) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CAKey)))
i += copy(dAtA[i:], m.CAKey)
}
if len(m.CrossSignedCACert) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.CrossSignedCACert)))
i += copy(dAtA[i:], m.CrossSignedCACert)
}
return i, nil
}
func (m *Privileges) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Privileges) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.CredentialSpec != nil {
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(m.CredentialSpec.Size()))
n40, err := m.CredentialSpec.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n40
}
if m.SELinuxContext != nil {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(m.SELinuxContext.Size()))
n41, err := m.SELinuxContext.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n41
}
return i, nil
}
func (m *Privileges_CredentialSpec) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Privileges_CredentialSpec) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Source != nil {
nn42, err := m.Source.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += nn42
}
return i, nil
}
func (m *Privileges_CredentialSpec_File) MarshalTo(dAtA []byte) (int, error) {
i := 0
dAtA[i] = 0xa
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.File)))
i += copy(dAtA[i:], m.File)
return i, nil
}
func (m *Privileges_CredentialSpec_Registry) MarshalTo(dAtA []byte) (int, error) {
i := 0
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Registry)))
i += copy(dAtA[i:], m.Registry)
return i, nil
}
func (m *Privileges_SELinuxContext) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Privileges_SELinuxContext) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Disable {
dAtA[i] = 0x8
i++
if m.Disable {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if len(m.User) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.User)))
i += copy(dAtA[i:], m.User)
}
if len(m.Role) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Role)))
i += copy(dAtA[i:], m.Role)
}
if len(m.Type) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
i += copy(dAtA[i:], m.Type)
}
if len(m.Level) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintTypes(dAtA, i, uint64(len(m.Level)))
i += copy(dAtA[i:], m.Level)
}
return i, nil
}
func encodeFixed64Types(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32Types(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Version) Size() (n int) {
var l int
_ = l
if m.Index != 0 {
n += 1 + sovTypes(uint64(m.Index))
}
return n
}
func (m *IndexEntry) Size() (n int) {
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Val)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Annotations) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Labels) > 0 {
for k, v := range m.Labels {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
}
}
if len(m.Indices) > 0 {
for _, e := range m.Indices {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
return n
}
func (m *Resources) Size() (n int) {
var l int
_ = l
if m.NanoCPUs != 0 {
n += 1 + sovTypes(uint64(m.NanoCPUs))
}
if m.MemoryBytes != 0 {
n += 1 + sovTypes(uint64(m.MemoryBytes))
}
return n
}
func (m *ResourceRequirements) Size() (n int) {
var l int
_ = l
if m.Limits != nil {
l = m.Limits.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.Reservations != nil {
l = m.Reservations.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Platform) Size() (n int) {
var l int
_ = l
l = len(m.Architecture)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.OS)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *PluginDescription) Size() (n int) {
var l int
_ = l
l = len(m.Type)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Name)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *EngineDescription) Size() (n int) {
var l int
_ = l
l = len(m.EngineVersion)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Labels) > 0 {
for k, v := range m.Labels {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
}
}
if len(m.Plugins) > 0 {
for _, e := range m.Plugins {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
return n
}
func (m *NodeDescription) Size() (n int) {
var l int
_ = l
l = len(m.Hostname)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.Platform != nil {
l = m.Platform.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.Resources != nil {
l = m.Resources.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.Engine != nil {
l = m.Engine.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.TLSInfo != nil {
l = m.TLSInfo.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *NodeTLSInfo) Size() (n int) {
var l int
_ = l
l = len(m.TrustRoot)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.CertIssuerSubject)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.CertIssuerPublicKey)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *RaftMemberStatus) Size() (n int) {
var l int
_ = l
if m.Leader {
n += 2
}
if m.Reachability != 0 {
n += 1 + sovTypes(uint64(m.Reachability))
}
l = len(m.Message)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *NodeStatus) Size() (n int) {
var l int
_ = l
if m.State != 0 {
n += 1 + sovTypes(uint64(m.State))
}
l = len(m.Message)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Addr)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Image) Size() (n int) {
var l int
_ = l
l = len(m.Reference)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Mount) Size() (n int) {
var l int
_ = l
if m.Type != 0 {
n += 1 + sovTypes(uint64(m.Type))
}
l = len(m.Source)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Target)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.ReadOnly {
n += 2
}
if m.BindOptions != nil {
l = m.BindOptions.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.VolumeOptions != nil {
l = m.VolumeOptions.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.TmpfsOptions != nil {
l = m.TmpfsOptions.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Mount_BindOptions) Size() (n int) {
var l int
_ = l
if m.Propagation != 0 {
n += 1 + sovTypes(uint64(m.Propagation))
}
return n
}
func (m *Mount_VolumeOptions) Size() (n int) {
var l int
_ = l
if m.NoCopy {
n += 2
}
if len(m.Labels) > 0 {
for k, v := range m.Labels {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
}
}
if m.DriverConfig != nil {
l = m.DriverConfig.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Mount_TmpfsOptions) Size() (n int) {
var l int
_ = l
if m.SizeBytes != 0 {
n += 1 + sovTypes(uint64(m.SizeBytes))
}
if m.Mode != 0 {
n += 1 + sovTypes(uint64(m.Mode))
}
return n
}
func (m *RestartPolicy) Size() (n int) {
var l int
_ = l
if m.Condition != 0 {
n += 1 + sovTypes(uint64(m.Condition))
}
if m.Delay != nil {
l = m.Delay.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.MaxAttempts != 0 {
n += 1 + sovTypes(uint64(m.MaxAttempts))
}
if m.Window != nil {
l = m.Window.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *UpdateConfig) Size() (n int) {
var l int
_ = l
if m.Parallelism != 0 {
n += 1 + sovTypes(uint64(m.Parallelism))
}
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Delay)
n += 1 + l + sovTypes(uint64(l))
if m.FailureAction != 0 {
n += 1 + sovTypes(uint64(m.FailureAction))
}
if m.Monitor != nil {
l = m.Monitor.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.MaxFailureRatio != 0 {
n += 5
}
if m.Order != 0 {
n += 1 + sovTypes(uint64(m.Order))
}
return n
}
func (m *UpdateStatus) Size() (n int) {
var l int
_ = l
if m.State != 0 {
n += 1 + sovTypes(uint64(m.State))
}
if m.StartedAt != nil {
l = m.StartedAt.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.CompletedAt != nil {
l = m.CompletedAt.Size()
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Message)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *ContainerStatus) Size() (n int) {
var l int
_ = l
l = len(m.ContainerID)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.PID != 0 {
n += 1 + sovTypes(uint64(m.PID))
}
if m.ExitCode != 0 {
n += 1 + sovTypes(uint64(m.ExitCode))
}
return n
}
func (m *PortStatus) Size() (n int) {
var l int
_ = l
if len(m.Ports) > 0 {
for _, e := range m.Ports {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
return n
}
func (m *TaskStatus) Size() (n int) {
var l int
_ = l
if m.Timestamp != nil {
l = m.Timestamp.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.State != 0 {
n += 1 + sovTypes(uint64(m.State))
}
l = len(m.Message)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Err)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.RuntimeStatus != nil {
n += m.RuntimeStatus.Size()
}
if m.PortStatus != nil {
l = m.PortStatus.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *TaskStatus_Container) Size() (n int) {
var l int
_ = l
if m.Container != nil {
l = m.Container.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *NetworkAttachmentConfig) Size() (n int) {
var l int
_ = l
l = len(m.Target)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Aliases) > 0 {
for _, s := range m.Aliases {
l = len(s)
n += 1 + l + sovTypes(uint64(l))
}
}
if len(m.Addresses) > 0 {
for _, s := range m.Addresses {
l = len(s)
n += 1 + l + sovTypes(uint64(l))
}
}
if len(m.DriverAttachmentOpts) > 0 {
for k, v := range m.DriverAttachmentOpts {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
}
}
return n
}
func (m *IPAMConfig) Size() (n int) {
var l int
_ = l
if m.Family != 0 {
n += 1 + sovTypes(uint64(m.Family))
}
l = len(m.Subnet)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Range)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Gateway)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Reserved) > 0 {
for k, v := range m.Reserved {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
}
}
return n
}
func (m *PortConfig) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.Protocol != 0 {
n += 1 + sovTypes(uint64(m.Protocol))
}
if m.TargetPort != 0 {
n += 1 + sovTypes(uint64(m.TargetPort))
}
if m.PublishedPort != 0 {
n += 1 + sovTypes(uint64(m.PublishedPort))
}
if m.PublishMode != 0 {
n += 1 + sovTypes(uint64(m.PublishMode))
}
return n
}
func (m *Driver) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Options) > 0 {
for k, v := range m.Options {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
}
}
return n
}
func (m *IPAMOptions) Size() (n int) {
var l int
_ = l
if m.Driver != nil {
l = m.Driver.Size()
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Configs) > 0 {
for _, e := range m.Configs {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
return n
}
func (m *Peer) Size() (n int) {
var l int
_ = l
l = len(m.NodeID)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Addr)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *WeightedPeer) Size() (n int) {
var l int
_ = l
if m.Peer != nil {
l = m.Peer.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.Weight != 0 {
n += 1 + sovTypes(uint64(m.Weight))
}
return n
}
func (m *IssuanceStatus) Size() (n int) {
var l int
_ = l
if m.State != 0 {
n += 1 + sovTypes(uint64(m.State))
}
l = len(m.Err)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *AcceptancePolicy) Size() (n int) {
var l int
_ = l
if len(m.Policies) > 0 {
for _, e := range m.Policies {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
return n
}
func (m *AcceptancePolicy_RoleAdmissionPolicy) Size() (n int) {
var l int
_ = l
if m.Role != 0 {
n += 1 + sovTypes(uint64(m.Role))
}
if m.Autoaccept {
n += 2
}
if m.Secret != nil {
l = m.Secret.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *AcceptancePolicy_RoleAdmissionPolicy_Secret) Size() (n int) {
var l int
_ = l
l = len(m.Data)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Alg)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *ExternalCA) Size() (n int) {
var l int
_ = l
if m.Protocol != 0 {
n += 1 + sovTypes(uint64(m.Protocol))
}
l = len(m.URL)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Options) > 0 {
for k, v := range m.Options {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
}
}
l = len(m.CACert)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *CAConfig) Size() (n int) {
var l int
_ = l
if m.NodeCertExpiry != nil {
l = m.NodeCertExpiry.Size()
n += 1 + l + sovTypes(uint64(l))
}
if len(m.ExternalCAs) > 0 {
for _, e := range m.ExternalCAs {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
l = len(m.SigningCACert)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.SigningCAKey)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.ForceRotate != 0 {
n += 1 + sovTypes(uint64(m.ForceRotate))
}
return n
}
func (m *OrchestrationConfig) Size() (n int) {
var l int
_ = l
if m.TaskHistoryRetentionLimit != 0 {
n += 1 + sovTypes(uint64(m.TaskHistoryRetentionLimit))
}
return n
}
func (m *TaskDefaults) Size() (n int) {
var l int
_ = l
if m.LogDriver != nil {
l = m.LogDriver.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *DispatcherConfig) Size() (n int) {
var l int
_ = l
if m.HeartbeatPeriod != nil {
l = m.HeartbeatPeriod.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *RaftConfig) Size() (n int) {
var l int
_ = l
if m.SnapshotInterval != 0 {
n += 1 + sovTypes(uint64(m.SnapshotInterval))
}
if m.KeepOldSnapshots != 0 {
n += 1 + sovTypes(uint64(m.KeepOldSnapshots))
}
if m.LogEntriesForSlowFollowers != 0 {
n += 1 + sovTypes(uint64(m.LogEntriesForSlowFollowers))
}
if m.HeartbeatTick != 0 {
n += 1 + sovTypes(uint64(m.HeartbeatTick))
}
if m.ElectionTick != 0 {
n += 1 + sovTypes(uint64(m.ElectionTick))
}
return n
}
func (m *EncryptionConfig) Size() (n int) {
var l int
_ = l
if m.AutoLockManagers {
n += 2
}
return n
}
func (m *SpreadOver) Size() (n int) {
var l int
_ = l
l = len(m.SpreadDescriptor)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *PlacementPreference) Size() (n int) {
var l int
_ = l
if m.Preference != nil {
n += m.Preference.Size()
}
return n
}
func (m *PlacementPreference_Spread) Size() (n int) {
var l int
_ = l
if m.Spread != nil {
l = m.Spread.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Placement) Size() (n int) {
var l int
_ = l
if len(m.Constraints) > 0 {
for _, s := range m.Constraints {
l = len(s)
n += 1 + l + sovTypes(uint64(l))
}
}
if len(m.Preferences) > 0 {
for _, e := range m.Preferences {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
if len(m.Platforms) > 0 {
for _, e := range m.Platforms {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
return n
}
func (m *JoinTokens) Size() (n int) {
var l int
_ = l
l = len(m.Worker)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Manager)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *RootCA) Size() (n int) {
var l int
_ = l
l = len(m.CAKey)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.CACert)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.CACertHash)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = m.JoinTokens.Size()
n += 1 + l + sovTypes(uint64(l))
if m.RootRotation != nil {
l = m.RootRotation.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.LastForcedRotation != 0 {
n += 1 + sovTypes(uint64(m.LastForcedRotation))
}
return n
}
func (m *Certificate) Size() (n int) {
var l int
_ = l
if m.Role != 0 {
n += 1 + sovTypes(uint64(m.Role))
}
l = len(m.CSR)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = m.Status.Size()
n += 1 + l + sovTypes(uint64(l))
l = len(m.Certificate)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.CN)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *EncryptionKey) Size() (n int) {
var l int
_ = l
l = len(m.Subsystem)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.Algorithm != 0 {
n += 1 + sovTypes(uint64(m.Algorithm))
}
l = len(m.Key)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.LamportTime != 0 {
n += 1 + sovTypes(uint64(m.LamportTime))
}
return n
}
func (m *ManagerStatus) Size() (n int) {
var l int
_ = l
if m.RaftID != 0 {
n += 1 + sovTypes(uint64(m.RaftID))
}
l = len(m.Addr)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.Leader {
n += 2
}
if m.Reachability != 0 {
n += 1 + sovTypes(uint64(m.Reachability))
}
return n
}
func (m *FileTarget) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.UID)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.GID)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.Mode != 0 {
n += 1 + sovTypes(uint64(m.Mode))
}
return n
}
func (m *SecretReference) Size() (n int) {
var l int
_ = l
l = len(m.SecretID)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.SecretName)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.Target != nil {
n += m.Target.Size()
}
return n
}
func (m *SecretReference_File) Size() (n int) {
var l int
_ = l
if m.File != nil {
l = m.File.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *ConfigReference) Size() (n int) {
var l int
_ = l
l = len(m.ConfigID)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.ConfigName)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.Target != nil {
n += m.Target.Size()
}
return n
}
func (m *ConfigReference_File) Size() (n int) {
var l int
_ = l
if m.File != nil {
l = m.File.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *BlacklistedCertificate) Size() (n int) {
var l int
_ = l
if m.Expiry != nil {
l = m.Expiry.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *HealthConfig) Size() (n int) {
var l int
_ = l
if len(m.Test) > 0 {
for _, s := range m.Test {
l = len(s)
n += 1 + l + sovTypes(uint64(l))
}
}
if m.Interval != nil {
l = m.Interval.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.Timeout != nil {
l = m.Timeout.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.Retries != 0 {
n += 1 + sovTypes(uint64(m.Retries))
}
if m.StartPeriod != nil {
l = m.StartPeriod.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *MaybeEncryptedRecord) Size() (n int) {
var l int
_ = l
if m.Algorithm != 0 {
n += 1 + sovTypes(uint64(m.Algorithm))
}
l = len(m.Data)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Nonce)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *RootRotation) Size() (n int) {
var l int
_ = l
l = len(m.CACert)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.CAKey)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.CrossSignedCACert)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Privileges) Size() (n int) {
var l int
_ = l
if m.CredentialSpec != nil {
l = m.CredentialSpec.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.SELinuxContext != nil {
l = m.SELinuxContext.Size()
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Privileges_CredentialSpec) Size() (n int) {
var l int
_ = l
if m.Source != nil {
n += m.Source.Size()
}
return n
}
func (m *Privileges_CredentialSpec_File) Size() (n int) {
var l int
_ = l
l = len(m.File)
n += 1 + l + sovTypes(uint64(l))
return n
}
func (m *Privileges_CredentialSpec_Registry) Size() (n int) {
var l int
_ = l
l = len(m.Registry)
n += 1 + l + sovTypes(uint64(l))
return n
}
func (m *Privileges_SELinuxContext) Size() (n int) {
var l int
_ = l
if m.Disable {
n += 2
}
l = len(m.User)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Role)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Type)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Level)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func sovTypes(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozTypes(x uint64) (n int) {
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Version) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Version{`,
`Index:` + fmt.Sprintf("%v", this.Index) + `,`,
`}`,
}, "")
return s
}
func (this *IndexEntry) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&IndexEntry{`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Val:` + fmt.Sprintf("%v", this.Val) + `,`,
`}`,
}, "")
return s
}
func (this *Annotations) String() string {
if this == nil {
return "nil"
}
keysForLabels := make([]string, 0, len(this.Labels))
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
}
mapStringForLabels += "}"
s := strings.Join([]string{`&Annotations{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Labels:` + mapStringForLabels + `,`,
`Indices:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Indices), "IndexEntry", "IndexEntry", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *Resources) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Resources{`,
`NanoCPUs:` + fmt.Sprintf("%v", this.NanoCPUs) + `,`,
`MemoryBytes:` + fmt.Sprintf("%v", this.MemoryBytes) + `,`,
`}`,
}, "")
return s
}
func (this *ResourceRequirements) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ResourceRequirements{`,
`Limits:` + strings.Replace(fmt.Sprintf("%v", this.Limits), "Resources", "Resources", 1) + `,`,
`Reservations:` + strings.Replace(fmt.Sprintf("%v", this.Reservations), "Resources", "Resources", 1) + `,`,
`}`,
}, "")
return s
}
func (this *Platform) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Platform{`,
`Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`,
`OS:` + fmt.Sprintf("%v", this.OS) + `,`,
`}`,
}, "")
return s
}
func (this *PluginDescription) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PluginDescription{`,
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`}`,
}, "")
return s
}
func (this *EngineDescription) String() string {
if this == nil {
return "nil"
}
keysForLabels := make([]string, 0, len(this.Labels))
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
}
mapStringForLabels += "}"
s := strings.Join([]string{`&EngineDescription{`,
`EngineVersion:` + fmt.Sprintf("%v", this.EngineVersion) + `,`,
`Labels:` + mapStringForLabels + `,`,
`Plugins:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Plugins), "PluginDescription", "PluginDescription", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *NodeDescription) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&NodeDescription{`,
`Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
`Platform:` + strings.Replace(fmt.Sprintf("%v", this.Platform), "Platform", "Platform", 1) + `,`,
`Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resources", "Resources", 1) + `,`,
`Engine:` + strings.Replace(fmt.Sprintf("%v", this.Engine), "EngineDescription", "EngineDescription", 1) + `,`,
`TLSInfo:` + strings.Replace(fmt.Sprintf("%v", this.TLSInfo), "NodeTLSInfo", "NodeTLSInfo", 1) + `,`,
`}`,
}, "")
return s
}
func (this *NodeTLSInfo) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&NodeTLSInfo{`,
`TrustRoot:` + fmt.Sprintf("%v", this.TrustRoot) + `,`,
`CertIssuerSubject:` + fmt.Sprintf("%v", this.CertIssuerSubject) + `,`,
`CertIssuerPublicKey:` + fmt.Sprintf("%v", this.CertIssuerPublicKey) + `,`,
`}`,
}, "")
return s
}
func (this *RaftMemberStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&RaftMemberStatus{`,
`Leader:` + fmt.Sprintf("%v", this.Leader) + `,`,
`Reachability:` + fmt.Sprintf("%v", this.Reachability) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
`}`,
}, "")
return s
}
func (this *NodeStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&NodeStatus{`,
`State:` + fmt.Sprintf("%v", this.State) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
`Addr:` + fmt.Sprintf("%v", this.Addr) + `,`,
`}`,
}, "")
return s
}
func (this *Image) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Image{`,
`Reference:` + fmt.Sprintf("%v", this.Reference) + `,`,
`}`,
}, "")
return s
}
func (this *Mount) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Mount{`,
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Source:` + fmt.Sprintf("%v", this.Source) + `,`,
`Target:` + fmt.Sprintf("%v", this.Target) + `,`,
`ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
`BindOptions:` + strings.Replace(fmt.Sprintf("%v", this.BindOptions), "Mount_BindOptions", "Mount_BindOptions", 1) + `,`,
`VolumeOptions:` + strings.Replace(fmt.Sprintf("%v", this.VolumeOptions), "Mount_VolumeOptions", "Mount_VolumeOptions", 1) + `,`,
`TmpfsOptions:` + strings.Replace(fmt.Sprintf("%v", this.TmpfsOptions), "Mount_TmpfsOptions", "Mount_TmpfsOptions", 1) + `,`,
`}`,
}, "")
return s
}
func (this *Mount_BindOptions) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Mount_BindOptions{`,
`Propagation:` + fmt.Sprintf("%v", this.Propagation) + `,`,
`}`,
}, "")
return s
}
func (this *Mount_VolumeOptions) String() string {
if this == nil {
return "nil"
}
keysForLabels := make([]string, 0, len(this.Labels))
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
}
mapStringForLabels += "}"
s := strings.Join([]string{`&Mount_VolumeOptions{`,
`NoCopy:` + fmt.Sprintf("%v", this.NoCopy) + `,`,
`Labels:` + mapStringForLabels + `,`,
`DriverConfig:` + strings.Replace(fmt.Sprintf("%v", this.DriverConfig), "Driver", "Driver", 1) + `,`,
`}`,
}, "")
return s
}
func (this *Mount_TmpfsOptions) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Mount_TmpfsOptions{`,
`SizeBytes:` + fmt.Sprintf("%v", this.SizeBytes) + `,`,
`Mode:` + fmt.Sprintf("%v", this.Mode) + `,`,
`}`,
}, "")
return s
}
func (this *RestartPolicy) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&RestartPolicy{`,
`Condition:` + fmt.Sprintf("%v", this.Condition) + `,`,
`Delay:` + strings.Replace(fmt.Sprintf("%v", this.Delay), "Duration", "google_protobuf1.Duration", 1) + `,`,
`MaxAttempts:` + fmt.Sprintf("%v", this.MaxAttempts) + `,`,
`Window:` + strings.Replace(fmt.Sprintf("%v", this.Window), "Duration", "google_protobuf1.Duration", 1) + `,`,
`}`,
}, "")
return s
}
func (this *UpdateConfig) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&UpdateConfig{`,
`Parallelism:` + fmt.Sprintf("%v", this.Parallelism) + `,`,
`Delay:` + strings.Replace(strings.Replace(this.Delay.String(), "Duration", "google_protobuf1.Duration", 1), `&`, ``, 1) + `,`,
`FailureAction:` + fmt.Sprintf("%v", this.FailureAction) + `,`,
`Monitor:` + strings.Replace(fmt.Sprintf("%v", this.Monitor), "Duration", "google_protobuf1.Duration", 1) + `,`,
`MaxFailureRatio:` + fmt.Sprintf("%v", this.MaxFailureRatio) + `,`,
`Order:` + fmt.Sprintf("%v", this.Order) + `,`,
`}`,
}, "")
return s
}
func (this *UpdateStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&UpdateStatus{`,
`State:` + fmt.Sprintf("%v", this.State) + `,`,
`StartedAt:` + strings.Replace(fmt.Sprintf("%v", this.StartedAt), "Timestamp", "google_protobuf.Timestamp", 1) + `,`,
`CompletedAt:` + strings.Replace(fmt.Sprintf("%v", this.CompletedAt), "Timestamp", "google_protobuf.Timestamp", 1) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
`}`,
}, "")
return s
}
func (this *ContainerStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ContainerStatus{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`PID:` + fmt.Sprintf("%v", this.PID) + `,`,
`ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`,
`}`,
}, "")
return s
}
func (this *PortStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PortStatus{`,
`Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "PortConfig", "PortConfig", 1) + `,`,
`}`,
}, "")
return s
}
func (this *TaskStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&TaskStatus{`,
`Timestamp:` + strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "google_protobuf.Timestamp", 1) + `,`,
`State:` + fmt.Sprintf("%v", this.State) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
`Err:` + fmt.Sprintf("%v", this.Err) + `,`,
`RuntimeStatus:` + fmt.Sprintf("%v", this.RuntimeStatus) + `,`,
`PortStatus:` + strings.Replace(fmt.Sprintf("%v", this.PortStatus), "PortStatus", "PortStatus", 1) + `,`,
`}`,
}, "")
return s
}
func (this *TaskStatus_Container) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&TaskStatus_Container{`,
`Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerStatus", "ContainerStatus", 1) + `,`,
`}`,
}, "")
return s
}
func (this *NetworkAttachmentConfig) String() string {
if this == nil {
return "nil"
}
keysForDriverAttachmentOpts := make([]string, 0, len(this.DriverAttachmentOpts))
for k, _ := range this.DriverAttachmentOpts {
keysForDriverAttachmentOpts = append(keysForDriverAttachmentOpts, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForDriverAttachmentOpts)
mapStringForDriverAttachmentOpts := "map[string]string{"
for _, k := range keysForDriverAttachmentOpts {
mapStringForDriverAttachmentOpts += fmt.Sprintf("%v: %v,", k, this.DriverAttachmentOpts[k])
}
mapStringForDriverAttachmentOpts += "}"
s := strings.Join([]string{`&NetworkAttachmentConfig{`,
`Target:` + fmt.Sprintf("%v", this.Target) + `,`,
`Aliases:` + fmt.Sprintf("%v", this.Aliases) + `,`,
`Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`,
`DriverAttachmentOpts:` + mapStringForDriverAttachmentOpts + `,`,
`}`,
}, "")
return s
}
func (this *IPAMConfig) String() string {
if this == nil {
return "nil"
}
keysForReserved := make([]string, 0, len(this.Reserved))
for k, _ := range this.Reserved {
keysForReserved = append(keysForReserved, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForReserved)
mapStringForReserved := "map[string]string{"
for _, k := range keysForReserved {
mapStringForReserved += fmt.Sprintf("%v: %v,", k, this.Reserved[k])
}
mapStringForReserved += "}"
s := strings.Join([]string{`&IPAMConfig{`,
`Family:` + fmt.Sprintf("%v", this.Family) + `,`,
`Subnet:` + fmt.Sprintf("%v", this.Subnet) + `,`,
`Range:` + fmt.Sprintf("%v", this.Range) + `,`,
`Gateway:` + fmt.Sprintf("%v", this.Gateway) + `,`,
`Reserved:` + mapStringForReserved + `,`,
`}`,
}, "")
return s
}
func (this *PortConfig) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PortConfig{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
`TargetPort:` + fmt.Sprintf("%v", this.TargetPort) + `,`,
`PublishedPort:` + fmt.Sprintf("%v", this.PublishedPort) + `,`,
`PublishMode:` + fmt.Sprintf("%v", this.PublishMode) + `,`,
`}`,
}, "")
return s
}
func (this *Driver) String() string {
if this == nil {
return "nil"
}
keysForOptions := make([]string, 0, len(this.Options))
for k, _ := range this.Options {
keysForOptions = append(keysForOptions, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForOptions)
mapStringForOptions := "map[string]string{"
for _, k := range keysForOptions {
mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k])
}
mapStringForOptions += "}"
s := strings.Join([]string{`&Driver{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Options:` + mapStringForOptions + `,`,
`}`,
}, "")
return s
}
func (this *IPAMOptions) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&IPAMOptions{`,
`Driver:` + strings.Replace(fmt.Sprintf("%v", this.Driver), "Driver", "Driver", 1) + `,`,
`Configs:` + strings.Replace(fmt.Sprintf("%v", this.Configs), "IPAMConfig", "IPAMConfig", 1) + `,`,
`}`,
}, "")
return s
}
func (this *Peer) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Peer{`,
`NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
`Addr:` + fmt.Sprintf("%v", this.Addr) + `,`,
`}`,
}, "")
return s
}
func (this *WeightedPeer) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&WeightedPeer{`,
`Peer:` + strings.Replace(fmt.Sprintf("%v", this.Peer), "Peer", "Peer", 1) + `,`,
`Weight:` + fmt.Sprintf("%v", this.Weight) + `,`,
`}`,
}, "")
return s
}
func (this *IssuanceStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&IssuanceStatus{`,
`State:` + fmt.Sprintf("%v", this.State) + `,`,
`Err:` + fmt.Sprintf("%v", this.Err) + `,`,
`}`,
}, "")
return s
}
func (this *AcceptancePolicy) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&AcceptancePolicy{`,
`Policies:` + strings.Replace(fmt.Sprintf("%v", this.Policies), "AcceptancePolicy_RoleAdmissionPolicy", "AcceptancePolicy_RoleAdmissionPolicy", 1) + `,`,
`}`,
}, "")
return s
}
func (this *AcceptancePolicy_RoleAdmissionPolicy) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&AcceptancePolicy_RoleAdmissionPolicy{`,
`Role:` + fmt.Sprintf("%v", this.Role) + `,`,
`Autoaccept:` + fmt.Sprintf("%v", this.Autoaccept) + `,`,
`Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "AcceptancePolicy_RoleAdmissionPolicy_Secret", "AcceptancePolicy_RoleAdmissionPolicy_Secret", 1) + `,`,
`}`,
}, "")
return s
}
func (this *AcceptancePolicy_RoleAdmissionPolicy_Secret) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&AcceptancePolicy_RoleAdmissionPolicy_Secret{`,
`Data:` + fmt.Sprintf("%v", this.Data) + `,`,
`Alg:` + fmt.Sprintf("%v", this.Alg) + `,`,
`}`,
}, "")
return s
}
func (this *ExternalCA) String() string {
if this == nil {
return "nil"
}
keysForOptions := make([]string, 0, len(this.Options))
for k, _ := range this.Options {
keysForOptions = append(keysForOptions, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForOptions)
mapStringForOptions := "map[string]string{"
for _, k := range keysForOptions {
mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k])
}
mapStringForOptions += "}"
s := strings.Join([]string{`&ExternalCA{`,
`Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
`URL:` + fmt.Sprintf("%v", this.URL) + `,`,
`Options:` + mapStringForOptions + `,`,
`CACert:` + fmt.Sprintf("%v", this.CACert) + `,`,
`}`,
}, "")
return s
}
func (this *CAConfig) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&CAConfig{`,
`NodeCertExpiry:` + strings.Replace(fmt.Sprintf("%v", this.NodeCertExpiry), "Duration", "google_protobuf1.Duration", 1) + `,`,
`ExternalCAs:` + strings.Replace(fmt.Sprintf("%v", this.ExternalCAs), "ExternalCA", "ExternalCA", 1) + `,`,
`SigningCACert:` + fmt.Sprintf("%v", this.SigningCACert) + `,`,
`SigningCAKey:` + fmt.Sprintf("%v", this.SigningCAKey) + `,`,
`ForceRotate:` + fmt.Sprintf("%v", this.ForceRotate) + `,`,
`}`,
}, "")
return s
}
func (this *OrchestrationConfig) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&OrchestrationConfig{`,
`TaskHistoryRetentionLimit:` + fmt.Sprintf("%v", this.TaskHistoryRetentionLimit) + `,`,
`}`,
}, "")
return s
}
func (this *TaskDefaults) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&TaskDefaults{`,
`LogDriver:` + strings.Replace(fmt.Sprintf("%v", this.LogDriver), "Driver", "Driver", 1) + `,`,
`}`,
}, "")
return s
}
func (this *DispatcherConfig) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&DispatcherConfig{`,
`HeartbeatPeriod:` + strings.Replace(fmt.Sprintf("%v", this.HeartbeatPeriod), "Duration", "google_protobuf1.Duration", 1) + `,`,
`}`,
}, "")
return s
}
func (this *RaftConfig) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&RaftConfig{`,
`SnapshotInterval:` + fmt.Sprintf("%v", this.SnapshotInterval) + `,`,
`KeepOldSnapshots:` + fmt.Sprintf("%v", this.KeepOldSnapshots) + `,`,
`LogEntriesForSlowFollowers:` + fmt.Sprintf("%v", this.LogEntriesForSlowFollowers) + `,`,
`HeartbeatTick:` + fmt.Sprintf("%v", this.HeartbeatTick) + `,`,
`ElectionTick:` + fmt.Sprintf("%v", this.ElectionTick) + `,`,
`}`,
}, "")
return s
}
func (this *EncryptionConfig) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&EncryptionConfig{`,
`AutoLockManagers:` + fmt.Sprintf("%v", this.AutoLockManagers) + `,`,
`}`,
}, "")
return s
}
func (this *SpreadOver) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&SpreadOver{`,
`SpreadDescriptor:` + fmt.Sprintf("%v", this.SpreadDescriptor) + `,`,
`}`,
}, "")
return s
}
func (this *PlacementPreference) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PlacementPreference{`,
`Preference:` + fmt.Sprintf("%v", this.Preference) + `,`,
`}`,
}, "")
return s
}
func (this *PlacementPreference_Spread) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PlacementPreference_Spread{`,
`Spread:` + strings.Replace(fmt.Sprintf("%v", this.Spread), "SpreadOver", "SpreadOver", 1) + `,`,
`}`,
}, "")
return s
}
func (this *Placement) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Placement{`,
`Constraints:` + fmt.Sprintf("%v", this.Constraints) + `,`,
`Preferences:` + strings.Replace(fmt.Sprintf("%v", this.Preferences), "PlacementPreference", "PlacementPreference", 1) + `,`,
`Platforms:` + strings.Replace(fmt.Sprintf("%v", this.Platforms), "Platform", "Platform", 1) + `,`,
`}`,
}, "")
return s
}
func (this *JoinTokens) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&JoinTokens{`,
`Worker:` + fmt.Sprintf("%v", this.Worker) + `,`,
`Manager:` + fmt.Sprintf("%v", this.Manager) + `,`,
`}`,
}, "")
return s
}
func (this *RootCA) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&RootCA{`,
`CAKey:` + fmt.Sprintf("%v", this.CAKey) + `,`,
`CACert:` + fmt.Sprintf("%v", this.CACert) + `,`,
`CACertHash:` + fmt.Sprintf("%v", this.CACertHash) + `,`,
`JoinTokens:` + strings.Replace(strings.Replace(this.JoinTokens.String(), "JoinTokens", "JoinTokens", 1), `&`, ``, 1) + `,`,
`RootRotation:` + strings.Replace(fmt.Sprintf("%v", this.RootRotation), "RootRotation", "RootRotation", 1) + `,`,
`LastForcedRotation:` + fmt.Sprintf("%v", this.LastForcedRotation) + `,`,
`}`,
}, "")
return s
}
func (this *Certificate) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Certificate{`,
`Role:` + fmt.Sprintf("%v", this.Role) + `,`,
`CSR:` + fmt.Sprintf("%v", this.CSR) + `,`,
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "IssuanceStatus", "IssuanceStatus", 1), `&`, ``, 1) + `,`,
`Certificate:` + fmt.Sprintf("%v", this.Certificate) + `,`,
`CN:` + fmt.Sprintf("%v", this.CN) + `,`,
`}`,
}, "")
return s
}
func (this *EncryptionKey) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&EncryptionKey{`,
`Subsystem:` + fmt.Sprintf("%v", this.Subsystem) + `,`,
`Algorithm:` + fmt.Sprintf("%v", this.Algorithm) + `,`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`LamportTime:` + fmt.Sprintf("%v", this.LamportTime) + `,`,
`}`,
}, "")
return s
}
func (this *ManagerStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ManagerStatus{`,
`RaftID:` + fmt.Sprintf("%v", this.RaftID) + `,`,
`Addr:` + fmt.Sprintf("%v", this.Addr) + `,`,
`Leader:` + fmt.Sprintf("%v", this.Leader) + `,`,
`Reachability:` + fmt.Sprintf("%v", this.Reachability) + `,`,
`}`,
}, "")
return s
}
func (this *FileTarget) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&FileTarget{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`UID:` + fmt.Sprintf("%v", this.UID) + `,`,
`GID:` + fmt.Sprintf("%v", this.GID) + `,`,
`Mode:` + fmt.Sprintf("%v", this.Mode) + `,`,
`}`,
}, "")
return s
}
func (this *SecretReference) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&SecretReference{`,
`SecretID:` + fmt.Sprintf("%v", this.SecretID) + `,`,
`SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`,
`Target:` + fmt.Sprintf("%v", this.Target) + `,`,
`}`,
}, "")
return s
}
func (this *SecretReference_File) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&SecretReference_File{`,
`File:` + strings.Replace(fmt.Sprintf("%v", this.File), "FileTarget", "FileTarget", 1) + `,`,
`}`,
}, "")
return s
}
func (this *ConfigReference) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ConfigReference{`,
`ConfigID:` + fmt.Sprintf("%v", this.ConfigID) + `,`,
`ConfigName:` + fmt.Sprintf("%v", this.ConfigName) + `,`,
`Target:` + fmt.Sprintf("%v", this.Target) + `,`,
`}`,
}, "")
return s
}
func (this *ConfigReference_File) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ConfigReference_File{`,
`File:` + strings.Replace(fmt.Sprintf("%v", this.File), "FileTarget", "FileTarget", 1) + `,`,
`}`,
}, "")
return s
}
func (this *BlacklistedCertificate) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&BlacklistedCertificate{`,
`Expiry:` + strings.Replace(fmt.Sprintf("%v", this.Expiry), "Timestamp", "google_protobuf.Timestamp", 1) + `,`,
`}`,
}, "")
return s
}
func (this *HealthConfig) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&HealthConfig{`,
`Test:` + fmt.Sprintf("%v", this.Test) + `,`,
`Interval:` + strings.Replace(fmt.Sprintf("%v", this.Interval), "Duration", "google_protobuf1.Duration", 1) + `,`,
`Timeout:` + strings.Replace(fmt.Sprintf("%v", this.Timeout), "Duration", "google_protobuf1.Duration", 1) + `,`,
`Retries:` + fmt.Sprintf("%v", this.Retries) + `,`,
`StartPeriod:` + strings.Replace(fmt.Sprintf("%v", this.StartPeriod), "Duration", "google_protobuf1.Duration", 1) + `,`,
`}`,
}, "")
return s
}
func (this *MaybeEncryptedRecord) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&MaybeEncryptedRecord{`,
`Algorithm:` + fmt.Sprintf("%v", this.Algorithm) + `,`,
`Data:` + fmt.Sprintf("%v", this.Data) + `,`,
`Nonce:` + fmt.Sprintf("%v", this.Nonce) + `,`,
`}`,
}, "")
return s
}
func (this *RootRotation) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&RootRotation{`,
`CACert:` + fmt.Sprintf("%v", this.CACert) + `,`,
`CAKey:` + fmt.Sprintf("%v", this.CAKey) + `,`,
`CrossSignedCACert:` + fmt.Sprintf("%v", this.CrossSignedCACert) + `,`,
`}`,
}, "")
return s
}
func (this *Privileges) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Privileges{`,
`CredentialSpec:` + strings.Replace(fmt.Sprintf("%v", this.CredentialSpec), "Privileges_CredentialSpec", "Privileges_CredentialSpec", 1) + `,`,
`SELinuxContext:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxContext), "Privileges_SELinuxContext", "Privileges_SELinuxContext", 1) + `,`,
`}`,
}, "")
return s
}
func (this *Privileges_CredentialSpec) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Privileges_CredentialSpec{`,
`Source:` + fmt.Sprintf("%v", this.Source) + `,`,
`}`,
}, "")
return s
}
func (this *Privileges_CredentialSpec_File) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Privileges_CredentialSpec_File{`,
`File:` + fmt.Sprintf("%v", this.File) + `,`,
`}`,
}, "")
return s
}
func (this *Privileges_CredentialSpec_Registry) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Privileges_CredentialSpec_Registry{`,
`Registry:` + fmt.Sprintf("%v", this.Registry) + `,`,
`}`,
}, "")
return s
}
func (this *Privileges_SELinuxContext) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Privileges_SELinuxContext{`,
`Disable:` + fmt.Sprintf("%v", this.Disable) + `,`,
`User:` + fmt.Sprintf("%v", this.User) + `,`,
`Role:` + fmt.Sprintf("%v", this.Role) + `,`,
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Level:` + fmt.Sprintf("%v", this.Level) + `,`,
`}`,
}, "")
return s
}
func valueToStringTypes(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *Version) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Version: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
}
m.Index = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Index |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *IndexEntry) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: IndexEntry: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: IndexEntry: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Val = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Annotations) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Annotations: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Annotations: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var keykey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
keykey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
if m.Labels == nil {
m.Labels = make(map[string]string)
}
if iNdEx < postIndex {
var valuekey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
valuekey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
m.Labels[mapkey] = mapvalue
} else {
var mapvalue string
m.Labels[mapkey] = mapvalue
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Indices", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Indices = append(m.Indices, IndexEntry{})
if err := m.Indices[len(m.Indices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Resources) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Resources: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Resources: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NanoCPUs", wireType)
}
m.NanoCPUs = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.NanoCPUs |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MemoryBytes", wireType)
}
m.MemoryBytes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MemoryBytes |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ResourceRequirements) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ResourceRequirements: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ResourceRequirements: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Limits == nil {
m.Limits = &Resources{}
}
if err := m.Limits.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Reservations", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Reservations == nil {
m.Reservations = &Resources{}
}
if err := m.Reservations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Platform) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Platform: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Platform: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Architecture", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Architecture = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field OS", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.OS = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PluginDescription) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PluginDescription: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PluginDescription: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Type = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *EngineDescription) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: EngineDescription: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: EngineDescription: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EngineVersion", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EngineVersion = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var keykey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
keykey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
if m.Labels == nil {
m.Labels = make(map[string]string)
}
if iNdEx < postIndex {
var valuekey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
valuekey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
m.Labels[mapkey] = mapvalue
} else {
var mapvalue string
m.Labels[mapkey] = mapvalue
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Plugins", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Plugins = append(m.Plugins, PluginDescription{})
if err := m.Plugins[len(m.Plugins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NodeDescription) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NodeDescription: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NodeDescription: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Hostname = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Platform == nil {
m.Platform = &Platform{}
}
if err := m.Platform.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Resources == nil {
m.Resources = &Resources{}
}
if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Engine == nil {
m.Engine = &EngineDescription{}
}
if err := m.Engine.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TLSInfo", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.TLSInfo == nil {
m.TLSInfo = &NodeTLSInfo{}
}
if err := m.TLSInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NodeTLSInfo) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NodeTLSInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NodeTLSInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TrustRoot", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TrustRoot = append(m.TrustRoot[:0], dAtA[iNdEx:postIndex]...)
if m.TrustRoot == nil {
m.TrustRoot = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CertIssuerSubject", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CertIssuerSubject = append(m.CertIssuerSubject[:0], dAtA[iNdEx:postIndex]...)
if m.CertIssuerSubject == nil {
m.CertIssuerSubject = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CertIssuerPublicKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CertIssuerPublicKey = append(m.CertIssuerPublicKey[:0], dAtA[iNdEx:postIndex]...)
if m.CertIssuerPublicKey == nil {
m.CertIssuerPublicKey = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RaftMemberStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RaftMemberStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RaftMemberStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Leader = bool(v != 0)
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Reachability", wireType)
}
m.Reachability = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Reachability |= (RaftMemberStatus_Reachability(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Message = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NodeStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NodeStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NodeStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
}
m.State = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.State |= (NodeStatus_State(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Message = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Addr = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Image) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Image: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Reference = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Mount) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Mount: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Mount: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
m.Type = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Type |= (Mount_MountType(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Source = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Target = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.ReadOnly = bool(v != 0)
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BindOptions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.BindOptions == nil {
m.BindOptions = &Mount_BindOptions{}
}
if err := m.BindOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VolumeOptions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.VolumeOptions == nil {
m.VolumeOptions = &Mount_VolumeOptions{}
}
if err := m.VolumeOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TmpfsOptions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.TmpfsOptions == nil {
m.TmpfsOptions = &Mount_TmpfsOptions{}
}
if err := m.TmpfsOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Mount_BindOptions) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: BindOptions: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BindOptions: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Propagation", wireType)
}
m.Propagation = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Propagation |= (Mount_BindOptions_MountPropagation(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Mount_VolumeOptions) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: VolumeOptions: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: VolumeOptions: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NoCopy", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.NoCopy = bool(v != 0)
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var keykey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
keykey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
if m.Labels == nil {
m.Labels = make(map[string]string)
}
if iNdEx < postIndex {
var valuekey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
valuekey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
m.Labels[mapkey] = mapvalue
} else {
var mapvalue string
m.Labels[mapkey] = mapvalue
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DriverConfig", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.DriverConfig == nil {
m.DriverConfig = &Driver{}
}
if err := m.DriverConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Mount_TmpfsOptions) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TmpfsOptions: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TmpfsOptions: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SizeBytes", wireType)
}
m.SizeBytes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SizeBytes |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
}
m.Mode = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mode |= (os.FileMode(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RestartPolicy) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RestartPolicy: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RestartPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Condition", wireType)
}
m.Condition = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Condition |= (RestartPolicy_RestartCondition(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Delay", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Delay == nil {
m.Delay = &google_protobuf1.Duration{}
}
if err := m.Delay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxAttempts", wireType)
}
m.MaxAttempts = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MaxAttempts |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Window", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Window == nil {
m.Window = &google_protobuf1.Duration{}
}
if err := m.Window.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *UpdateConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: UpdateConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: UpdateConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Parallelism", wireType)
}
m.Parallelism = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Parallelism |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Delay", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Delay, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field FailureAction", wireType)
}
m.FailureAction = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.FailureAction |= (UpdateConfig_FailureAction(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Monitor", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Monitor == nil {
m.Monitor = &google_protobuf1.Duration{}
}
if err := m.Monitor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxFailureRatio", wireType)
}
var v uint32
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 4
v = uint32(dAtA[iNdEx-4])
v |= uint32(dAtA[iNdEx-3]) << 8
v |= uint32(dAtA[iNdEx-2]) << 16
v |= uint32(dAtA[iNdEx-1]) << 24
m.MaxFailureRatio = float32(math.Float32frombits(v))
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType)
}
m.Order = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Order |= (UpdateConfig_UpdateOrder(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *UpdateStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: UpdateStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: UpdateStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
}
m.State = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.State |= (UpdateStatus_UpdateState(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.StartedAt == nil {
m.StartedAt = &google_protobuf.Timestamp{}
}
if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CompletedAt", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.CompletedAt == nil {
m.CompletedAt = &google_protobuf.Timestamp{}
}
if err := m.CompletedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Message = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ContainerStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ContainerStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ContainerID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PID", wireType)
}
m.PID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.PID |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType)
}
m.ExitCode = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ExitCode |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PortStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PortStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PortStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Ports = append(m.Ports, &PortConfig{})
if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *TaskStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TaskStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TaskStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Timestamp == nil {
m.Timestamp = &google_protobuf.Timestamp{}
}
if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
}
m.State = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.State |= (TaskState(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Message = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Err = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &ContainerStatus{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.RuntimeStatus = &TaskStatus_Container{v}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PortStatus", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.PortStatus == nil {
m.PortStatus = &PortStatus{}
}
if err := m.PortStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NetworkAttachmentConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NetworkAttachmentConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NetworkAttachmentConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Target = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Aliases = append(m.Aliases, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DriverAttachmentOpts", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var keykey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
keykey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
if m.DriverAttachmentOpts == nil {
m.DriverAttachmentOpts = make(map[string]string)
}
if iNdEx < postIndex {
var valuekey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
valuekey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
m.DriverAttachmentOpts[mapkey] = mapvalue
} else {
var mapvalue string
m.DriverAttachmentOpts[mapkey] = mapvalue
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *IPAMConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: IPAMConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: IPAMConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Family", wireType)
}
m.Family = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Family |= (IPAMConfig_AddressFamily(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subnet", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subnet = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Range = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Gateway = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Reserved", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var keykey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
keykey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
if m.Reserved == nil {
m.Reserved = make(map[string]string)
}
if iNdEx < postIndex {
var valuekey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
valuekey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
m.Reserved[mapkey] = mapvalue
} else {
var mapvalue string
m.Reserved[mapkey] = mapvalue
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PortConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PortConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PortConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
}
m.Protocol = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Protocol |= (PortConfig_Protocol(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TargetPort", wireType)
}
m.TargetPort = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TargetPort |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PublishedPort", wireType)
}
m.PublishedPort = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.PublishedPort |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PublishMode", wireType)
}
m.PublishMode = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.PublishMode |= (PortConfig_PublishMode(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Driver) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Driver: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Driver: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var keykey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
keykey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
if m.Options == nil {
m.Options = make(map[string]string)
}
if iNdEx < postIndex {
var valuekey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
valuekey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
m.Options[mapkey] = mapvalue
} else {
var mapvalue string
m.Options[mapkey] = mapvalue
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *IPAMOptions) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: IPAMOptions: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: IPAMOptions: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Driver == nil {
m.Driver = &Driver{}
}
if err := m.Driver.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Configs", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Configs = append(m.Configs, &IPAMConfig{})
if err := m.Configs[len(m.Configs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Peer) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Peer: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Peer: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NodeID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Addr = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *WeightedPeer) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: WeightedPeer: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: WeightedPeer: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Peer == nil {
m.Peer = &Peer{}
}
if err := m.Peer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
}
m.Weight = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Weight |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *IssuanceStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: IssuanceStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: IssuanceStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
}
m.State = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.State |= (IssuanceStatus_State(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Err = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AcceptancePolicy) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: AcceptancePolicy: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AcceptancePolicy: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Policies", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Policies = append(m.Policies, &AcceptancePolicy_RoleAdmissionPolicy{})
if err := m.Policies[len(m.Policies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AcceptancePolicy_RoleAdmissionPolicy) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RoleAdmissionPolicy: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RoleAdmissionPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
m.Role = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Role |= (NodeRole(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Autoaccept", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Autoaccept = bool(v != 0)
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Secret == nil {
m.Secret = &AcceptancePolicy_RoleAdmissionPolicy_Secret{}
}
if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AcceptancePolicy_RoleAdmissionPolicy_Secret) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Secret: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Secret: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Alg", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Alg = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ExternalCA) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ExternalCA: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ExternalCA: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
}
m.Protocol = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Protocol |= (ExternalCA_CAProtocol(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.URL = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var keykey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
keykey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
if m.Options == nil {
m.Options = make(map[string]string)
}
if iNdEx < postIndex {
var valuekey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
valuekey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthTypes
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
m.Options[mapkey] = mapvalue
} else {
var mapvalue string
m.Options[mapkey] = mapvalue
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CACert", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CACert = append(m.CACert[:0], dAtA[iNdEx:postIndex]...)
if m.CACert == nil {
m.CACert = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *CAConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CAConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CAConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NodeCertExpiry", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.NodeCertExpiry == nil {
m.NodeCertExpiry = &google_protobuf1.Duration{}
}
if err := m.NodeCertExpiry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ExternalCAs", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ExternalCAs = append(m.ExternalCAs, &ExternalCA{})
if err := m.ExternalCAs[len(m.ExternalCAs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SigningCACert", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SigningCACert = append(m.SigningCACert[:0], dAtA[iNdEx:postIndex]...)
if m.SigningCACert == nil {
m.SigningCACert = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SigningCAKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SigningCAKey = append(m.SigningCAKey[:0], dAtA[iNdEx:postIndex]...)
if m.SigningCAKey == nil {
m.SigningCAKey = []byte{}
}
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ForceRotate", wireType)
}
m.ForceRotate = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ForceRotate |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *OrchestrationConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: OrchestrationConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: OrchestrationConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TaskHistoryRetentionLimit", wireType)
}
m.TaskHistoryRetentionLimit = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TaskHistoryRetentionLimit |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *TaskDefaults) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TaskDefaults: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TaskDefaults: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LogDriver", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LogDriver == nil {
m.LogDriver = &Driver{}
}
if err := m.LogDriver.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *DispatcherConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: DispatcherConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DispatcherConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field HeartbeatPeriod", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.HeartbeatPeriod == nil {
m.HeartbeatPeriod = &google_protobuf1.Duration{}
}
if err := m.HeartbeatPeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RaftConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RaftConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RaftConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotInterval", wireType)
}
m.SnapshotInterval = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SnapshotInterval |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field KeepOldSnapshots", wireType)
}
m.KeepOldSnapshots = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.KeepOldSnapshots |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LogEntriesForSlowFollowers", wireType)
}
m.LogEntriesForSlowFollowers = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LogEntriesForSlowFollowers |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field HeartbeatTick", wireType)
}
m.HeartbeatTick = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.HeartbeatTick |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ElectionTick", wireType)
}
m.ElectionTick = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ElectionTick |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *EncryptionConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: EncryptionConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: EncryptionConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field AutoLockManagers", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.AutoLockManagers = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *SpreadOver) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: SpreadOver: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SpreadOver: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SpreadDescriptor", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SpreadDescriptor = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PlacementPreference) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PlacementPreference: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PlacementPreference: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Spread", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &SpreadOver{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Preference = &PlacementPreference_Spread{v}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Placement) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Placement: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Placement: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Constraints", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Constraints = append(m.Constraints, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Preferences", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Preferences = append(m.Preferences, &PlacementPreference{})
if err := m.Preferences[len(m.Preferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Platforms", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Platforms = append(m.Platforms, &Platform{})
if err := m.Platforms[len(m.Platforms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *JoinTokens) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: JoinTokens: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: JoinTokens: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Worker", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Worker = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Manager", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Manager = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RootCA) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RootCA: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RootCA: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CAKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CAKey = append(m.CAKey[:0], dAtA[iNdEx:postIndex]...)
if m.CAKey == nil {
m.CAKey = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CACert", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CACert = append(m.CACert[:0], dAtA[iNdEx:postIndex]...)
if m.CACert == nil {
m.CACert = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CACertHash", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CACertHash = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field JoinTokens", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.JoinTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RootRotation", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.RootRotation == nil {
m.RootRotation = &RootRotation{}
}
if err := m.RootRotation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LastForcedRotation", wireType)
}
m.LastForcedRotation = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LastForcedRotation |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Certificate) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Certificate: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Certificate: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
m.Role = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Role |= (NodeRole(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CSR", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CSR = append(m.CSR[:0], dAtA[iNdEx:postIndex]...)
if m.CSR == nil {
m.CSR = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Certificate = append(m.Certificate[:0], dAtA[iNdEx:postIndex]...)
if m.Certificate == nil {
m.Certificate = []byte{}
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CN", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CN = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *EncryptionKey) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: EncryptionKey: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: EncryptionKey: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subsystem", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subsystem = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType)
}
m.Algorithm = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Algorithm |= (EncryptionKey_Algorithm(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
if m.Key == nil {
m.Key = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LamportTime", wireType)
}
m.LamportTime = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LamportTime |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ManagerStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ManagerStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ManagerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field RaftID", wireType)
}
m.RaftID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.RaftID |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Addr = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Leader = bool(v != 0)
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Reachability", wireType)
}
m.Reachability = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Reachability |= (RaftMemberStatus_Reachability(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *FileTarget) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: FileTarget: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: FileTarget: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.UID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.GID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
}
m.Mode = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mode |= (os.FileMode(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *SecretReference) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: SecretReference: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SecretReference: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SecretID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SecretID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SecretName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field File", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &FileTarget{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Target = &SecretReference_File{v}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ConfigReference) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ConfigReference: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ConfigReference: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ConfigID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ConfigID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ConfigName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ConfigName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field File", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &FileTarget{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Target = &ConfigReference_File{v}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *BlacklistedCertificate) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: BlacklistedCertificate: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BlacklistedCertificate: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Expiry == nil {
m.Expiry = &google_protobuf.Timestamp{}
}
if err := m.Expiry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HealthConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: HealthConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HealthConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Test = append(m.Test, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Interval == nil {
m.Interval = &google_protobuf1.Duration{}
}
if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Timeout == nil {
m.Timeout = &google_protobuf1.Duration{}
}
if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Retries", wireType)
}
m.Retries = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Retries |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StartPeriod", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.StartPeriod == nil {
m.StartPeriod = &google_protobuf1.Duration{}
}
if err := m.StartPeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MaybeEncryptedRecord) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MaybeEncryptedRecord: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MaybeEncryptedRecord: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType)
}
m.Algorithm = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Algorithm |= (MaybeEncryptedRecord_Algorithm(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...)
if m.Nonce == nil {
m.Nonce = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RootRotation) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RootRotation: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RootRotation: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CACert", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CACert = append(m.CACert[:0], dAtA[iNdEx:postIndex]...)
if m.CACert == nil {
m.CACert = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CAKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CAKey = append(m.CAKey[:0], dAtA[iNdEx:postIndex]...)
if m.CAKey == nil {
m.CAKey = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CrossSignedCACert", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CrossSignedCACert = append(m.CrossSignedCACert[:0], dAtA[iNdEx:postIndex]...)
if m.CrossSignedCACert == nil {
m.CrossSignedCACert = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Privileges) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Privileges: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Privileges: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CredentialSpec", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.CredentialSpec == nil {
m.CredentialSpec = &Privileges_CredentialSpec{}
}
if err := m.CredentialSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SELinuxContext", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.SELinuxContext == nil {
m.SELinuxContext = &Privileges_SELinuxContext{}
}
if err := m.SELinuxContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Privileges_CredentialSpec) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CredentialSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CredentialSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field File", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Source = &Privileges_CredentialSpec_File{string(dAtA[iNdEx:postIndex])}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Registry", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Source = &Privileges_CredentialSpec_Registry{string(dAtA[iNdEx:postIndex])}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Privileges_SELinuxContext) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: SELinuxContext: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SELinuxContext: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Disable", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Disable = bool(v != 0)
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.User = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Role = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Type = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Level = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTypes(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowTypes
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowTypes
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowTypes
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthTypes
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowTypes
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipTypes(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("types.proto", fileDescriptorTypes) }
var fileDescriptorTypes = []byte{
// 4705 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x7a, 0x4d, 0x6c, 0x24, 0xd7,
0x56, 0xbf, 0xfb, 0xd3, 0xdd, 0xa7, 0xdb, 0x76, 0xf9, 0x8e, 0x33, 0xf1, 0x74, 0x26, 0x76, 0xa7,
0x92, 0x79, 0xf9, 0x78, 0xf9, 0x77, 0x66, 0x3c, 0x49, 0x34, 0x49, 0xfe, 0x2f, 0x49, 0x7f, 0x79,
0xdc, 0x6f, 0xec, 0xee, 0xd6, 0xed, 0xf6, 0xcc, 0xcb, 0x02, 0x4a, 0xe5, 0xaa, 0xeb, 0x76, 0xc5,
0xd5, 0x75, 0x9b, 0xaa, 0x6a, 0x7b, 0x9a, 0x07, 0x62, 0xc4, 0x02, 0x90, 0x57, 0xb0, 0x43, 0x42,
0x66, 0x03, 0x2b, 0x84, 0xc4, 0x02, 0x24, 0x04, 0x1b, 0x82, 0xc4, 0x22, 0x3b, 0x1e, 0x20, 0xa1,
0x27, 0x90, 0x0c, 0xf1, 0x82, 0x1d, 0x82, 0xcd, 0x13, 0x1b, 0x90, 0xd0, 0xfd, 0xa8, 0xea, 0x6a,
0x4f, 0xd9, 0x9e, 0x90, 0xb7, 0xb1, 0xeb, 0x9e, 0xf3, 0x3b, 0xe7, 0xde, 0x7b, 0xee, 0xb9, 0xe7,
0x9e, 0x73, 0x6f, 0x43, 0xc1, 0x9f, 0x8c, 0x88, 0x57, 0x19, 0xb9, 0xd4, 0xa7, 0x08, 0x99, 0xd4,
0x38, 0x24, 0x6e, 0xc5, 0x3b, 0xd6, 0xdd, 0xe1, 0xa1, 0xe5, 0x57, 0x8e, 0xee, 0x95, 0xd6, 0x07,
0x94, 0x0e, 0x6c, 0xf2, 0x1e, 0x47, 0xec, 0x8d, 0xf7, 0xdf, 0xf3, 0xad, 0x21, 0xf1, 0x7c, 0x7d,
0x38, 0x12, 0x42, 0xa5, 0xb5, 0x8b, 0x00, 0x73, 0xec, 0xea, 0xbe, 0x45, 0x1d, 0xc9, 0x5f, 0x19,
0xd0, 0x01, 0xe5, 0x9f, 0xef, 0xb1, 0x2f, 0x41, 0x55, 0xd7, 0x61, 0xfe, 0x31, 0x71, 0x3d, 0x8b,
0x3a, 0x68, 0x05, 0x32, 0x96, 0x63, 0x92, 0xa7, 0xab, 0x89, 0x72, 0xe2, 0xad, 0x34, 0x16, 0x0d,
0xf5, 0x2e, 0x40, 0x8b, 0x7d, 0x34, 0x1d, 0xdf, 0x9d, 0x20, 0x05, 0x52, 0x87, 0x64, 0xc2, 0x11,
0x79, 0xcc, 0x3e, 0x19, 0xe5, 0x48, 0xb7, 0x57, 0x93, 0x82, 0x72, 0xa4, 0xdb, 0xea, 0x37, 0x09,
0x28, 0x54, 0x1d, 0x87, 0xfa, 0xbc, 0x77, 0x0f, 0x21, 0x48, 0x3b, 0xfa, 0x90, 0x48, 0x21, 0xfe,
0x8d, 0xea, 0x90, 0xb5, 0xf5, 0x3d, 0x62, 0x7b, 0xab, 0xc9, 0x72, 0xea, 0xad, 0xc2, 0xc6, 0xf7,
0x2b, 0xcf, 0x4f, 0xb9, 0x12, 0x51, 0x52, 0xd9, 0xe6, 0x68, 0x3e, 0x08, 0x2c, 0x45, 0xd1, 0xa7,
0x30, 0x6f, 0x39, 0xa6, 0x65, 0x10, 0x6f, 0x35, 0xcd, 0xb5, 0xac, 0xc5, 0x69, 0x99, 0x8e, 0xbe,
0x96, 0xfe, 0xfa, 0x6c, 0x7d, 0x0e, 0x07, 0x42, 0xa5, 0x8f, 0xa0, 0x10, 0x51, 0x1b, 0x33, 0xb7,
0x15, 0xc8, 0x1c, 0xe9, 0xf6, 0x98, 0xc8, 0xd9, 0x89, 0xc6, 0xc7, 0xc9, 0x07, 0x09, 0xf5, 0x0b,
0xc8, 0x63, 0xe2, 0xd1, 0xb1, 0x6b, 0x10, 0x0f, 0xbd, 0x0d, 0x79, 0x47, 0x77, 0xa8, 0x66, 0x8c,
0xc6, 0x1e, 0x17, 0x4f, 0xd5, 0x8a, 0xe7, 0x67, 0xeb, 0xb9, 0xb6, 0xee, 0xd0, 0x7a, 0x77, 0xd7,
0xc3, 0x39, 0xc6, 0xae, 0x8f, 0xc6, 0x1e, 0x7a, 0x0d, 0x8a, 0x43, 0x32, 0xa4, 0xee, 0x44, 0xdb,
0x9b, 0xf8, 0xc4, 0xe3, 0x8a, 0x53, 0xb8, 0x20, 0x68, 0x35, 0x46, 0x52, 0x7f, 0x3b, 0x01, 0x2b,
0x81, 0x6e, 0x4c, 0x7e, 0x69, 0x6c, 0xb9, 0x64, 0x48, 0x1c, 0xdf, 0x43, 0x1f, 0x40, 0xd6, 0xb6,
0x86, 0x96, 0x2f, 0xfa, 0x28, 0x6c, 0xbc, 0x1a, 0x37, 0xdb, 0x70, 0x54, 0x58, 0x82, 0x51, 0x15,
0x8a, 0x2e, 0xf1, 0x88, 0x7b, 0x24, 0x2c, 0xc9, 0xbb, 0xbc, 0x56, 0x78, 0x46, 0x44, 0xdd, 0x84,
0x5c, 0xd7, 0xd6, 0xfd, 0x7d, 0xea, 0x0e, 0x91, 0x0a, 0x45, 0xdd, 0x35, 0x0e, 0x2c, 0x9f, 0x18,
0xfe, 0xd8, 0x0d, 0x56, 0x75, 0x86, 0x86, 0x6e, 0x42, 0x92, 0x8a, 0x8e, 0xf2, 0xb5, 0xec, 0xf9,
0xd9, 0x7a, 0xb2, 0xd3, 0xc3, 0x49, 0xea, 0xa9, 0x9f, 0xc0, 0x72, 0xd7, 0x1e, 0x0f, 0x2c, 0xa7,
0x41, 0x3c, 0xc3, 0xb5, 0x46, 0x4c, 0x3b, 0x73, 0x0f, 0xe6, 0xfb, 0x81, 0x7b, 0xb0, 0xef, 0xd0,
0x65, 0x92, 0x53, 0x97, 0x51, 0x7f, 0x33, 0x09, 0xcb, 0x4d, 0x67, 0x60, 0x39, 0x24, 0x2a, 0x7d,
0x07, 0x16, 0x09, 0x27, 0x6a, 0x47, 0xc2, 0x8d, 0xa5, 0x9e, 0x05, 0x41, 0x0d, 0x7c, 0xbb, 0x75,
0xc1, 0xdf, 0xee, 0xc5, 0x4d, 0xff, 0x39, 0xed, 0xb1, 0x5e, 0xd7, 0x84, 0xf9, 0x11, 0x9f, 0x84,
0xb7, 0x9a, 0xe2, 0xba, 0xee, 0xc4, 0xe9, 0x7a, 0x6e, 0x9e, 0x81, 0xf3, 0x49, 0xd9, 0xef, 0xe2,
0x7c, 0x7f, 0x9c, 0x84, 0xa5, 0x36, 0x35, 0x67, 0xec, 0x50, 0x82, 0xdc, 0x01, 0xf5, 0xfc, 0xc8,
0x46, 0x0b, 0xdb, 0xe8, 0x01, 0xe4, 0x46, 0x72, 0xf9, 0xe4, 0xea, 0xdf, 0x8e, 0x1f, 0xb2, 0xc0,
0xe0, 0x10, 0x8d, 0x3e, 0x81, 0xbc, 0x1b, 0xf8, 0xc4, 0x6a, 0xea, 0x45, 0x1c, 0x67, 0x8a, 0x47,
0x3f, 0x80, 0xac, 0x58, 0x84, 0xd5, 0x34, 0x97, 0xbc, 0xf3, 0x42, 0x36, 0xc7, 0x52, 0x08, 0x3d,
0x84, 0x9c, 0x6f, 0x7b, 0x9a, 0xe5, 0xec, 0xd3, 0xd5, 0x0c, 0x57, 0xb0, 0x1e, 0xa7, 0x80, 0x19,
0xa2, 0xbf, 0xdd, 0x6b, 0x39, 0xfb, 0xb4, 0x56, 0x38, 0x3f, 0x5b, 0x9f, 0x97, 0x0d, 0x3c, 0xef,
0xdb, 0x1e, 0xfb, 0x50, 0x7f, 0x27, 0x01, 0x85, 0x08, 0x0a, 0xbd, 0x0a, 0xe0, 0xbb, 0x63, 0xcf,
0xd7, 0x5c, 0x4a, 0x7d, 0x6e, 0xac, 0x22, 0xce, 0x73, 0x0a, 0xa6, 0xd4, 0x47, 0x15, 0xb8, 0x61,
0x10, 0xd7, 0xd7, 0x2c, 0xcf, 0x1b, 0x13, 0x57, 0xf3, 0xc6, 0x7b, 0x5f, 0x12, 0xc3, 0xe7, 0x86,
0x2b, 0xe2, 0x65, 0xc6, 0x6a, 0x71, 0x4e, 0x4f, 0x30, 0xd0, 0x7d, 0xb8, 0x19, 0xc5, 0x8f, 0xc6,
0x7b, 0xb6, 0x65, 0x68, 0x6c, 0x31, 0x53, 0x5c, 0xe4, 0xc6, 0x54, 0xa4, 0xcb, 0x79, 0x8f, 0xc8,
0x44, 0xfd, 0x69, 0x02, 0x14, 0xac, 0xef, 0xfb, 0x3b, 0x64, 0xb8, 0x47, 0xdc, 0x9e, 0xaf, 0xfb,
0x63, 0x0f, 0xdd, 0x84, 0xac, 0x4d, 0x74, 0x93, 0xb8, 0x7c, 0x50, 0x39, 0x2c, 0x5b, 0x68, 0x97,
0xed, 0x60, 0xdd, 0x38, 0xd0, 0xf7, 0x2c, 0xdb, 0xf2, 0x27, 0x7c, 0x28, 0x8b, 0xf1, 0x2e, 0x7c,
0x51, 0x67, 0x05, 0x47, 0x04, 0xf1, 0x8c, 0x1a, 0xb4, 0x0a, 0xf3, 0x43, 0xe2, 0x79, 0xfa, 0x80,
0xf0, 0x91, 0xe6, 0x71, 0xd0, 0x54, 0x3f, 0x81, 0x62, 0x54, 0x0e, 0x15, 0x60, 0x7e, 0xb7, 0xfd,
0xa8, 0xdd, 0x79, 0xd2, 0x56, 0xe6, 0xd0, 0x12, 0x14, 0x76, 0xdb, 0xb8, 0x59, 0xad, 0x6f, 0x55,
0x6b, 0xdb, 0x4d, 0x25, 0x81, 0x16, 0x20, 0x3f, 0x6d, 0x26, 0xd5, 0x3f, 0x4d, 0x00, 0x30, 0x73,
0xcb, 0x49, 0x7d, 0x0c, 0x19, 0xcf, 0xd7, 0x7d, 0xe1, 0x95, 0x8b, 0x1b, 0x6f, 0x5c, 0xb6, 0x86,
0x72, 0xbc, 0xec, 0x1f, 0xc1, 0x42, 0x24, 0x3a, 0xc2, 0xe4, 0xcc, 0x08, 0x59, 0x80, 0xd0, 0x4d,
0xd3, 0x95, 0x03, 0xe7, 0xdf, 0xea, 0x27, 0x90, 0xe1, 0xd2, 0xb3, 0xc3, 0xcd, 0x41, 0xba, 0xc1,
0xbe, 0x12, 0x28, 0x0f, 0x19, 0xdc, 0xac, 0x36, 0xbe, 0x50, 0x92, 0x48, 0x81, 0x62, 0xa3, 0xd5,
0xab, 0x77, 0xda, 0xed, 0x66, 0xbd, 0xdf, 0x6c, 0x28, 0x29, 0xf5, 0x0e, 0x64, 0x5a, 0x43, 0xa6,
0xf9, 0x36, 0x73, 0xf9, 0x7d, 0xe2, 0x12, 0xc7, 0x08, 0x76, 0xd2, 0x94, 0xa0, 0xfe, 0x24, 0x0f,
0x99, 0x1d, 0x3a, 0x76, 0x7c, 0xb4, 0x11, 0x09, 0x5b, 0x8b, 0xf1, 0x27, 0x0f, 0x07, 0x56, 0xfa,
0x93, 0x11, 0x91, 0x61, 0xed, 0x26, 0x64, 0xc5, 0xe6, 0x90, 0xd3, 0x91, 0x2d, 0x46, 0xf7, 0x75,
0x77, 0x40, 0x7c, 0x39, 0x1f, 0xd9, 0x42, 0x6f, 0x41, 0xce, 0x25, 0xba, 0x49, 0x1d, 0x7b, 0xc2,
0xf7, 0x50, 0x4e, 0x9c, 0x2b, 0x98, 0xe8, 0x66, 0xc7, 0xb1, 0x27, 0x38, 0xe4, 0xa2, 0x2d, 0x28,
0xee, 0x59, 0x8e, 0xa9, 0xd1, 0x91, 0x08, 0xf2, 0x99, 0xcb, 0x77, 0x9c, 0x18, 0x55, 0xcd, 0x72,
0xcc, 0x8e, 0x00, 0xe3, 0xc2, 0xde, 0xb4, 0x81, 0xda, 0xb0, 0x78, 0x44, 0xed, 0xf1, 0x90, 0x84,
0xba, 0xb2, 0x5c, 0xd7, 0x9b, 0x97, 0xeb, 0x7a, 0xcc, 0xf1, 0x81, 0xb6, 0x85, 0xa3, 0x68, 0x13,
0x3d, 0x82, 0x05, 0x7f, 0x38, 0xda, 0xf7, 0x42, 0x75, 0xf3, 0x5c, 0xdd, 0xf7, 0xae, 0x30, 0x18,
0x83, 0x07, 0xda, 0x8a, 0x7e, 0xa4, 0x55, 0xfa, 0xf5, 0x14, 0x14, 0x22, 0x23, 0x47, 0x3d, 0x28,
0x8c, 0x5c, 0x3a, 0xd2, 0x07, 0xfc, 0xa0, 0x92, 0x6b, 0x71, 0xef, 0x85, 0x66, 0x5d, 0xe9, 0x4e,
0x05, 0x71, 0x54, 0x8b, 0x7a, 0x9a, 0x84, 0x42, 0x84, 0x89, 0xde, 0x81, 0x1c, 0xee, 0xe2, 0xd6,
0xe3, 0x6a, 0xbf, 0xa9, 0xcc, 0x95, 0x6e, 0x9f, 0x9c, 0x96, 0x57, 0xb9, 0xb6, 0xa8, 0x82, 0xae,
0x6b, 0x1d, 0x31, 0xd7, 0x7b, 0x0b, 0xe6, 0x03, 0x68, 0xa2, 0xf4, 0xca, 0xc9, 0x69, 0xf9, 0xe5,
0x8b, 0xd0, 0x08, 0x12, 0xf7, 0xb6, 0xaa, 0xb8, 0xd9, 0x50, 0x92, 0xf1, 0x48, 0xdc, 0x3b, 0xd0,
0x5d, 0x62, 0xa2, 0xef, 0x41, 0x56, 0x02, 0x53, 0xa5, 0xd2, 0xc9, 0x69, 0xf9, 0xe6, 0x45, 0xe0,
0x14, 0x87, 0x7b, 0xdb, 0xd5, 0xc7, 0x4d, 0x25, 0x1d, 0x8f, 0xc3, 0x3d, 0x5b, 0x3f, 0x22, 0xe8,
0x0d, 0xc8, 0x08, 0x58, 0xa6, 0x74, 0xeb, 0xe4, 0xb4, 0xfc, 0xd2, 0x73, 0xea, 0x18, 0xaa, 0xb4,
0xfa, 0x5b, 0x7f, 0xb0, 0x36, 0xf7, 0x97, 0x7f, 0xb8, 0xa6, 0x5c, 0x64, 0x97, 0xfe, 0x3b, 0x01,
0x0b, 0x33, 0x4b, 0x8e, 0x54, 0xc8, 0x3a, 0xd4, 0xa0, 0x23, 0x71, 0x7e, 0xe5, 0x6a, 0x70, 0x7e,
0xb6, 0x9e, 0x6d, 0xd3, 0x3a, 0x1d, 0x4d, 0xb0, 0xe4, 0xa0, 0x47, 0x17, 0x4e, 0xe0, 0xfb, 0x2f,
0xe8, 0x4f, 0xb1, 0x67, 0xf0, 0x67, 0xb0, 0x60, 0xba, 0xd6, 0x11, 0x71, 0x35, 0x83, 0x3a, 0xfb,
0xd6, 0x40, 0x9e, 0x4d, 0xa5, 0x38, 0x9d, 0x0d, 0x0e, 0xc4, 0x45, 0x21, 0x50, 0xe7, 0xf8, 0xef,
0x70, 0xfa, 0x96, 0x1e, 0x43, 0x31, 0xea, 0xa1, 0xec, 0x38, 0xf1, 0xac, 0x5f, 0x26, 0x32, 0xa1,
0xe3, 0xe9, 0x1f, 0xce, 0x33, 0x0a, 0x4f, 0xe7, 0xd0, 0x9b, 0x90, 0x1e, 0x52, 0x53, 0xe8, 0x59,
0xa8, 0xdd, 0x60, 0x49, 0xc0, 0x3f, 0x9d, 0xad, 0x17, 0xa8, 0x57, 0xd9, 0xb4, 0x6c, 0xb2, 0x43,
0x4d, 0x82, 0x39, 0x40, 0x3d, 0x82, 0x34, 0x0b, 0x15, 0xe8, 0x15, 0x48, 0xd7, 0x5a, 0xed, 0x86,
0x32, 0x57, 0x5a, 0x3e, 0x39, 0x2d, 0x2f, 0x70, 0x93, 0x30, 0x06, 0xf3, 0x5d, 0xb4, 0x0e, 0xd9,
0xc7, 0x9d, 0xed, 0xdd, 0x1d, 0xe6, 0x5e, 0x37, 0x4e, 0x4e, 0xcb, 0x4b, 0x21, 0x5b, 0x18, 0x0d,
0xbd, 0x0a, 0x99, 0xfe, 0x4e, 0x77, 0xb3, 0xa7, 0x24, 0x4b, 0xe8, 0xe4, 0xb4, 0xbc, 0x18, 0xf2,
0xf9, 0x98, 0x4b, 0xcb, 0x72, 0x55, 0xf3, 0x21, 0x5d, 0xfd, 0x59, 0x12, 0x16, 0x30, 0xab, 0x24,
0x5c, 0xbf, 0x4b, 0x6d, 0xcb, 0x98, 0xa0, 0x2e, 0xe4, 0x0d, 0xea, 0x98, 0x56, 0x64, 0x4f, 0x6d,
0x5c, 0x72, 0xea, 0x4f, 0xa5, 0x82, 0x56, 0x3d, 0x90, 0xc4, 0x53, 0x25, 0xe8, 0x3d, 0xc8, 0x98,
0xc4, 0xd6, 0x27, 0x32, 0xfd, 0xb8, 0x55, 0x11, 0xb5, 0x4a, 0x25, 0xa8, 0x55, 0x2a, 0x0d, 0x59,
0xab, 0x60, 0x81, 0xe3, 0x79, 0xb2, 0xfe, 0x54, 0xd3, 0x7d, 0x9f, 0x0c, 0x47, 0xbe, 0xc8, 0x3d,
0xd2, 0xb8, 0x30, 0xd4, 0x9f, 0x56, 0x25, 0x09, 0xdd, 0x83, 0xec, 0xb1, 0xe5, 0x98, 0xf4, 0x58,
0xa6, 0x17, 0x57, 0x28, 0x95, 0x40, 0xf5, 0x84, 0x9d, 0xba, 0x17, 0x86, 0xc9, 0xec, 0xdd, 0xee,
0xb4, 0x9b, 0x81, 0xbd, 0x25, 0xbf, 0xe3, 0xb4, 0xa9, 0xc3, 0xf6, 0x0a, 0x74, 0xda, 0xda, 0x66,
0xb5, 0xb5, 0xbd, 0x8b, 0x99, 0xcd, 0x57, 0x4e, 0x4e, 0xcb, 0x4a, 0x08, 0xd9, 0xd4, 0x2d, 0x9b,
0xe5, 0xbb, 0xb7, 0x20, 0x55, 0x6d, 0x7f, 0xa1, 0x24, 0x4b, 0xca, 0xc9, 0x69, 0xb9, 0x18, 0xb2,
0xab, 0xce, 0x64, 0xba, 0x8d, 0x2e, 0xf6, 0xab, 0xfe, 0x6d, 0x0a, 0x8a, 0xbb, 0x23, 0x53, 0xf7,
0x89, 0xf0, 0x49, 0x54, 0x86, 0xc2, 0x48, 0x77, 0x75, 0xdb, 0x26, 0xb6, 0xe5, 0x0d, 0x65, 0x15,
0x16, 0x25, 0xa1, 0x8f, 0x5e, 0xd4, 0x8c, 0xb5, 0x1c, 0xf3, 0xb3, 0xdf, 0xfd, 0x97, 0xf5, 0x44,
0x60, 0xd0, 0x5d, 0x58, 0xdc, 0x17, 0xa3, 0xd5, 0x74, 0x83, 0x2f, 0x6c, 0x8a, 0x2f, 0x6c, 0x25,
0x6e, 0x61, 0xa3, 0xc3, 0xaa, 0xc8, 0x49, 0x56, 0xb9, 0x14, 0x5e, 0xd8, 0x8f, 0x36, 0xd1, 0x7d,
0x98, 0x1f, 0x52, 0xc7, 0xf2, 0xa9, 0x7b, 0xfd, 0x2a, 0x04, 0x48, 0xf4, 0x0e, 0x2c, 0xb3, 0xc5,
0x0d, 0xc6, 0xc3, 0xd9, 0xfc, 0xc4, 0x4a, 0xe2, 0xa5, 0xa1, 0xfe, 0x54, 0x76, 0x88, 0x19, 0x19,
0xd5, 0x20, 0x43, 0x5d, 0x96, 0x12, 0x65, 0xf9, 0x70, 0xdf, 0xbd, 0x76, 0xb8, 0xa2, 0xd1, 0x61,
0x32, 0x58, 0x88, 0xaa, 0x1f, 0xc2, 0xc2, 0xcc, 0x24, 0x58, 0x26, 0xd0, 0xad, 0xee, 0xf6, 0x9a,
0xca, 0x1c, 0x2a, 0x42, 0xae, 0xde, 0x69, 0xf7, 0x5b, 0xed, 0x5d, 0x96, 0xca, 0x14, 0x21, 0x87,
0x3b, 0xdb, 0xdb, 0xb5, 0x6a, 0xfd, 0x91, 0x92, 0x54, 0x2b, 0x50, 0x88, 0x68, 0x43, 0x8b, 0x00,
0xbd, 0x7e, 0xa7, 0xab, 0x6d, 0xb6, 0x70, 0xaf, 0x2f, 0x12, 0xa1, 0x5e, 0xbf, 0x8a, 0xfb, 0x92,
0x90, 0x50, 0xff, 0x23, 0x19, 0xac, 0xa8, 0xcc, 0x7d, 0x6a, 0xb3, 0xb9, 0xcf, 0x15, 0x83, 0x97,
0xd9, 0xcf, 0xb4, 0x11, 0xe6, 0x40, 0x1f, 0x01, 0x70, 0xc7, 0x21, 0xa6, 0xa6, 0xfb, 0x72, 0xe1,
0x4b, 0xcf, 0x19, 0xb9, 0x1f, 0x5c, 0x06, 0xe0, 0xbc, 0x44, 0x57, 0x7d, 0xf4, 0x03, 0x28, 0x1a,
0x74, 0x38, 0xb2, 0x89, 0x14, 0x4e, 0x5d, 0x2b, 0x5c, 0x08, 0xf1, 0x55, 0x3f, 0x9a, 0x7d, 0xa5,
0x67, 0xf3, 0xc3, 0xdf, 0x48, 0x04, 0x96, 0x89, 0x49, 0xb8, 0x8a, 0x90, 0xdb, 0xed, 0x36, 0xaa,
0xfd, 0x56, 0xfb, 0xa1, 0x92, 0x40, 0x00, 0x59, 0x6e, 0xea, 0x86, 0x92, 0x64, 0x89, 0x62, 0xbd,
0xb3, 0xd3, 0xdd, 0x6e, 0xf2, 0x94, 0x0b, 0xad, 0x80, 0x12, 0x18, 0x5b, 0xe3, 0x86, 0x6c, 0x36,
0x94, 0x34, 0xba, 0x01, 0x4b, 0x21, 0x55, 0x4a, 0x66, 0xd0, 0x4d, 0x40, 0x21, 0x71, 0xaa, 0x22,
0xab, 0xfe, 0x2a, 0x2c, 0xd5, 0xa9, 0xe3, 0xeb, 0x96, 0x13, 0x26, 0xd1, 0x1b, 0x6c, 0xd2, 0x92,
0xa4, 0x59, 0xa6, 0x88, 0xe9, 0xb5, 0xa5, 0xf3, 0xb3, 0xf5, 0x42, 0x08, 0x6d, 0x35, 0xd8, 0x4c,
0x83, 0x86, 0xc9, 0xf6, 0xef, 0xc8, 0x32, 0xb9, 0x71, 0x33, 0xb5, 0xf9, 0xf3, 0xb3, 0xf5, 0x54,
0xb7, 0xd5, 0xc0, 0x8c, 0x86, 0x5e, 0x81, 0x3c, 0x79, 0x6a, 0xf9, 0x9a, 0xc1, 0x62, 0x38, 0x33,
0x60, 0x06, 0xe7, 0x18, 0xa1, 0xce, 0x42, 0x76, 0x0d, 0xa0, 0x4b, 0x5d, 0x5f, 0xf6, 0xfc, 0x3e,
0x64, 0x46, 0xd4, 0xe5, 0xe5, 0xf9, 0xa5, 0x97, 0x11, 0x0c, 0x2e, 0x1c, 0x15, 0x0b, 0xb0, 0xfa,
0x57, 0x49, 0x80, 0xbe, 0xee, 0x1d, 0x4a, 0x25, 0x0f, 0x20, 0x1f, 0x5e, 0xec, 0xc8, 0x3a, 0xff,
0xca, 0xd5, 0x0e, 0xc1, 0xe8, 0x7e, 0xe0, 0x6c, 0xa2, 0x3c, 0x88, 0xad, 0xd3, 0x82, 0x8e, 0xe2,
0x32, 0xec, 0xd9, 0x1a, 0x80, 0x1d, 0x89, 0xc4, 0x75, 0xe5, 0xca, 0xb3, 0x4f, 0x54, 0xe7, 0xc7,
0x82, 0x30, 0x9a, 0x4c, 0x30, 0x5f, 0x8f, 0xeb, 0xe4, 0xc2, 0x8a, 0x6c, 0xcd, 0xe1, 0xa9, 0x1c,
0xfa, 0x0c, 0x0a, 0x6c, 0xde, 0x9a, 0xc7, 0x79, 0x32, 0xb7, 0xbc, 0xd4, 0x54, 0x42, 0x03, 0x86,
0x51, 0xf8, 0x5d, 0x53, 0x60, 0xd1, 0x1d, 0x3b, 0x6c, 0xda, 0x52, 0x87, 0xfa, 0x27, 0x49, 0x78,
0xb9, 0x4d, 0xfc, 0x63, 0xea, 0x1e, 0x56, 0x7d, 0x5f, 0x37, 0x0e, 0x86, 0xc4, 0x91, 0x46, 0x8e,
0x64, 0xd6, 0x89, 0x99, 0xcc, 0x7a, 0x15, 0xe6, 0x75, 0xdb, 0xd2, 0x3d, 0x22, 0xd2, 0x91, 0x3c,
0x0e, 0x9a, 0x2c, 0xff, 0x67, 0xd5, 0x04, 0xf1, 0x3c, 0x22, 0x0a, 0xfc, 0x3c, 0x9e, 0x12, 0xd0,
0x8f, 0xe1, 0xa6, 0x4c, 0x3c, 0xf4, 0xb0, 0x2b, 0x96, 0xd9, 0x06, 0x37, 0x50, 0xcd, 0xd8, 0xf2,
0x26, 0x7e, 0x70, 0x32, 0x33, 0x99, 0x92, 0x3b, 0x23, 0x5f, 0xe6, 0x39, 0x2b, 0x66, 0x0c, 0xab,
0xf4, 0x10, 0x6e, 0x5d, 0x2a, 0xf2, 0xad, 0x2e, 0x10, 0xfe, 0x21, 0x09, 0xd0, 0xea, 0x56, 0x77,
0xa4, 0x91, 0x1a, 0x90, 0xdd, 0xd7, 0x87, 0x96, 0x3d, 0xb9, 0x2a, 0x4e, 0x4d, 0xf1, 0x95, 0xaa,
0x30, 0xc7, 0x26, 0x97, 0xc1, 0x52, 0x96, 0x17, 0x37, 0xe3, 0x3d, 0x87, 0xf8, 0x61, 0x71, 0xc3,
0x5b, 0x6c, 0x18, 0xae, 0xee, 0x84, 0x0e, 0x26, 0x1a, 0x6c, 0x01, 0x06, 0xba, 0x4f, 0x8e, 0xf5,
0x49, 0x10, 0x5c, 0x64, 0x13, 0x6d, 0xb1, 0xa2, 0xc7, 0x23, 0xee, 0x11, 0x31, 0x57, 0x33, 0xdc,
0xa8, 0xd7, 0x8d, 0x07, 0x4b, 0xb8, 0xb0, 0x5d, 0x28, 0x5d, 0xfa, 0x84, 0x27, 0x36, 0x53, 0xd6,
0xb7, 0xb2, 0xd1, 0x5d, 0x58, 0x98, 0x99, 0xe7, 0x73, 0x55, 0x65, 0xab, 0xfb, 0xf8, 0x7d, 0x25,
0x2d, 0xbf, 0x3e, 0x54, 0xb2, 0xea, 0x1f, 0xa5, 0x44, 0x38, 0x90, 0x56, 0x8d, 0xbf, 0xf6, 0xcc,
0xf1, 0x4d, 0x6c, 0x50, 0x5b, 0x6e, 0xd3, 0x37, 0xaf, 0x8e, 0x12, 0xac, 0x4a, 0xe1, 0x70, 0x1c,
0x0a, 0xa2, 0x75, 0x28, 0x08, 0x2f, 0xd6, 0xd8, 0xb6, 0xe0, 0x66, 0x5d, 0xc0, 0x20, 0x48, 0x4c,
0x12, 0xdd, 0x81, 0x45, 0x7e, 0x0b, 0xe1, 0x1d, 0x10, 0x53, 0x60, 0xd2, 0x1c, 0xb3, 0x10, 0x52,
0x39, 0x6c, 0x07, 0x8a, 0x92, 0xa0, 0xf1, 0x0c, 0x35, 0xc3, 0x07, 0xf4, 0xce, 0x75, 0x03, 0x12,
0x22, 0x3c, 0x71, 0x2d, 0x8c, 0xa6, 0x0d, 0xb5, 0x01, 0xb9, 0x60, 0xb0, 0x68, 0x15, 0x52, 0xfd,
0x7a, 0x57, 0x99, 0x2b, 0x2d, 0x9d, 0x9c, 0x96, 0x0b, 0x01, 0xb9, 0x5f, 0xef, 0x32, 0xce, 0x6e,
0xa3, 0xab, 0x24, 0x66, 0x39, 0xbb, 0x8d, 0x6e, 0x29, 0xcd, 0x32, 0x25, 0x75, 0x1f, 0x0a, 0x91,
0x1e, 0xd0, 0xeb, 0x30, 0xdf, 0x6a, 0x3f, 0xc4, 0xcd, 0x5e, 0x4f, 0x99, 0x2b, 0xdd, 0x3c, 0x39,
0x2d, 0xa3, 0x08, 0xb7, 0xe5, 0x0c, 0xd8, 0xfa, 0xa0, 0x57, 0x21, 0xbd, 0xd5, 0x61, 0x27, 0xb0,
0x48, 0x89, 0x23, 0x88, 0x2d, 0xea, 0xf9, 0xa5, 0x1b, 0x32, 0x05, 0x8b, 0x2a, 0x56, 0x7f, 0x2f,
0x01, 0x59, 0xb1, 0x99, 0x62, 0x17, 0xaa, 0x0a, 0xf3, 0x41, 0xbd, 0x2a, 0xca, 0x95, 0x37, 0x2f,
0x2f, 0x2d, 0x2a, 0xb2, 0x12, 0x10, 0xee, 0x17, 0xc8, 0x95, 0x3e, 0x86, 0x62, 0x94, 0xf1, 0xad,
0x9c, 0xef, 0xc7, 0x50, 0x60, 0xfe, 0x1d, 0x94, 0x18, 0x1b, 0x90, 0x15, 0x01, 0x21, 0x3c, 0x11,
0x2e, 0xaf, 0x73, 0x24, 0x12, 0x3d, 0x80, 0x79, 0x51, 0x1b, 0x05, 0xd7, 0x94, 0x6b, 0x57, 0xef,
0x22, 0x1c, 0xc0, 0xd5, 0xcf, 0x20, 0xdd, 0x25, 0xc4, 0x65, 0xb6, 0x77, 0xa8, 0x49, 0xa6, 0x87,
0xa8, 0x2c, 0xeb, 0x4c, 0xd2, 0x6a, 0xb0, 0xb2, 0xce, 0x24, 0x2d, 0x33, 0xbc, 0x88, 0x49, 0x46,
0x2e, 0x62, 0xfa, 0x50, 0x7c, 0x42, 0xac, 0xc1, 0x81, 0x4f, 0x4c, 0xae, 0xe8, 0x5d, 0x48, 0x8f,
0x48, 0x38, 0xf8, 0xd5, 0x58, 0x07, 0x23, 0xc4, 0xc5, 0x1c, 0xc5, 0xe2, 0xc8, 0x31, 0x97, 0x96,
0x97, 0xe3, 0xb2, 0xa5, 0xfe, 0x7d, 0x12, 0x16, 0x5b, 0x9e, 0x37, 0xd6, 0x1d, 0x23, 0xc8, 0xaf,
0x3e, 0x9d, 0xcd, 0xaf, 0xde, 0x8a, 0x9d, 0xe1, 0x8c, 0xc8, 0xec, 0xfd, 0x92, 0x3c, 0xe3, 0x92,
0xe1, 0x19, 0xa7, 0xfe, 0x7b, 0x22, 0xb8, 0x44, 0xba, 0x13, 0xd9, 0xee, 0xa5, 0xd5, 0x93, 0xd3,
0xf2, 0x4a, 0x54, 0x13, 0xd9, 0x75, 0x0e, 0x1d, 0x7a, 0xec, 0xa0, 0xd7, 0x20, 0x83, 0x9b, 0xed,
0xe6, 0x13, 0x25, 0x21, 0xdc, 0x73, 0x06, 0x84, 0x89, 0x43, 0x8e, 0x99, 0xa6, 0x6e, 0xb3, 0xdd,
0x60, 0xf9, 0x50, 0x32, 0x46, 0x53, 0x97, 0x38, 0xa6, 0xe5, 0x0c, 0xd0, 0xeb, 0x90, 0x6d, 0xf5,
0x7a, 0xbb, 0xbc, 0xcc, 0x7f, 0xf9, 0xe4, 0xb4, 0x7c, 0x63, 0x06, 0xc5, 0x2f, 0x10, 0x4d, 0x06,
0x62, 0xc5, 0x08, 0xcb, 0x94, 0x62, 0x40, 0x2c, 0xcb, 0x15, 0x20, 0xdc, 0xe9, 0x57, 0xfb, 0xac,
0xc2, 0x7f, 0x1e, 0x84, 0x29, 0xfb, 0x2b, 0xb7, 0xdb, 0x3f, 0x27, 0x41, 0xa9, 0x1a, 0x06, 0x19,
0xf9, 0x8c, 0x2f, 0xeb, 0xbf, 0x3e, 0xe4, 0x46, 0xec, 0xcb, 0x22, 0x41, 0x2e, 0xf3, 0x20, 0xf6,
0x79, 0xe6, 0x82, 0x5c, 0x05, 0x53, 0x9b, 0x54, 0xcd, 0xa1, 0xe5, 0x79, 0x16, 0x75, 0x04, 0x0d,
0x87, 0x9a, 0x4a, 0xff, 0x99, 0x80, 0x1b, 0x31, 0x08, 0x74, 0x17, 0xd2, 0x2e, 0xb5, 0x83, 0x35,
0xbc, 0x7d, 0xd9, 0xfd, 0x20, 0x13, 0xc5, 0x1c, 0x89, 0xd6, 0x00, 0xf4, 0xb1, 0x4f, 0x75, 0xde,
0x3f, 0x5f, 0xbd, 0x1c, 0x8e, 0x50, 0xd0, 0x13, 0xc8, 0x7a, 0xc4, 0x70, 0x49, 0x90, 0xf1, 0x7e,
0xf6, 0x7f, 0x1d, 0x7d, 0xa5, 0xc7, 0xd5, 0x60, 0xa9, 0xae, 0x54, 0x81, 0xac, 0xa0, 0x30, 0xb7,
0x37, 0x75, 0x5f, 0x97, 0xb7, 0xc7, 0xfc, 0x9b, 0x79, 0x93, 0x6e, 0x0f, 0x02, 0x6f, 0xd2, 0xed,
0x81, 0xfa, 0x37, 0x49, 0x80, 0xe6, 0x53, 0x9f, 0xb8, 0x8e, 0x6e, 0xd7, 0xab, 0xa8, 0x19, 0x89,
0xfe, 0x62, 0xb6, 0x6f, 0xc7, 0x5e, 0x89, 0x87, 0x12, 0x95, 0x7a, 0x35, 0x26, 0xfe, 0xdf, 0x82,
0xd4, 0xd8, 0x95, 0x2f, 0x6e, 0x22, 0x5b, 0xdd, 0xc5, 0xdb, 0x98, 0xd1, 0x50, 0x73, 0x1a, 0xb6,
0x52, 0x97, 0xbf, 0xab, 0x45, 0x3a, 0x88, 0x0d, 0x5d, 0x6c, 0xe7, 0x1b, 0xba, 0x66, 0x10, 0x79,
0x72, 0x14, 0xc5, 0xce, 0xaf, 0x57, 0xeb, 0xc4, 0xf5, 0x71, 0xd6, 0xd0, 0xd9, 0xff, 0xef, 0x14,
0xdf, 0xde, 0x05, 0x98, 0x4e, 0x0d, 0xad, 0x41, 0xa6, 0xbe, 0xd9, 0xeb, 0x6d, 0x2b, 0x73, 0x22,
0x80, 0x4f, 0x59, 0x9c, 0xac, 0xfe, 0x45, 0x12, 0x72, 0xf5, 0xaa, 0x3c, 0x56, 0xeb, 0xa0, 0xf0,
0xa8, 0xc4, 0xef, 0xdc, 0xc9, 0xd3, 0x91, 0xe5, 0x4e, 0x64, 0x60, 0xb9, 0xa2, 0xf4, 0x5c, 0x64,
0x22, 0x6c, 0xd4, 0x4d, 0x2e, 0x80, 0x30, 0x14, 0x89, 0x34, 0x82, 0x66, 0xe8, 0x41, 0x8c, 0x5f,
0xbb, 0xda, 0x58, 0xa2, 0x88, 0x98, 0xb6, 0x3d, 0x5c, 0x08, 0x94, 0xd4, 0x75, 0x0f, 0x7d, 0x04,
0x4b, 0x9e, 0x35, 0x70, 0x2c, 0x67, 0xa0, 0x05, 0xc6, 0xe3, 0x0f, 0x00, 0xb5, 0xe5, 0xf3, 0xb3,
0xf5, 0x85, 0x9e, 0x60, 0x49, 0x1b, 0x2e, 0x48, 0x64, 0x9d, 0x9b, 0x12, 0x7d, 0x08, 0x8b, 0x11,
0x51, 0x66, 0x45, 0x61, 0x76, 0xe5, 0xfc, 0x6c, 0xbd, 0x18, 0x4a, 0x3e, 0x22, 0x13, 0x5c, 0x0c,
0x05, 0x1f, 0x11, 0x7e, 0x4b, 0xb2, 0x4f, 0x5d, 0x83, 0x68, 0x2e, 0xdf, 0xd3, 0xfc, 0x04, 0x4f,
0xe3, 0x02, 0xa7, 0x89, 0x6d, 0xae, 0x3e, 0x86, 0x1b, 0x1d, 0xd7, 0x38, 0x20, 0x9e, 0x2f, 0x4c,
0x21, 0xad, 0xf8, 0x19, 0xdc, 0xf6, 0x75, 0xef, 0x50, 0x3b, 0xb0, 0x3c, 0x9f, 0xba, 0x13, 0xcd,
0x25, 0x3e, 0x71, 0x18, 0x5f, 0xe3, 0xaf, 0x86, 0xf2, 0x1a, 0xeb, 0x16, 0xc3, 0x6c, 0x09, 0x08,
0x0e, 0x10, 0xdb, 0x0c, 0xa0, 0xb6, 0xa0, 0xc8, 0x8a, 0x89, 0x06, 0xd9, 0xd7, 0xc7, 0xb6, 0xcf,
0x66, 0x0f, 0x36, 0x1d, 0x68, 0x2f, 0x7c, 0x4c, 0xe5, 0x6d, 0x3a, 0x10, 0x9f, 0xea, 0x8f, 0x40,
0x69, 0x58, 0xde, 0x48, 0xf7, 0x8d, 0x83, 0xe0, 0x7e, 0x0e, 0x35, 0x40, 0x39, 0x20, 0xba, 0xeb,
0xef, 0x11, 0xdd, 0xd7, 0x46, 0xc4, 0xb5, 0xa8, 0x79, 0xfd, 0x2a, 0x2f, 0x85, 0x22, 0x5d, 0x2e,
0xa1, 0xfe, 0x57, 0x02, 0x00, 0xeb, 0xfb, 0x41, 0x46, 0xf6, 0x7d, 0x58, 0xf6, 0x1c, 0x7d, 0xe4,
0x1d, 0x50, 0x5f, 0xb3, 0x1c, 0x9f, 0xb8, 0x47, 0xba, 0x2d, 0xaf, 0x59, 0x94, 0x80, 0xd1, 0x92,
0x74, 0xf4, 0x2e, 0xa0, 0x43, 0x42, 0x46, 0x1a, 0xb5, 0x4d, 0x2d, 0x60, 0x8a, 0x37, 0xcd, 0x34,
0x56, 0x18, 0xa7, 0x63, 0x9b, 0xbd, 0x80, 0x8e, 0x6a, 0xb0, 0xc6, 0xa6, 0x4f, 0x1c, 0xdf, 0xb5,
0x88, 0xa7, 0xed, 0x53, 0x57, 0xf3, 0x6c, 0x7a, 0xac, 0xed, 0x53, 0xdb, 0xa6, 0xc7, 0xc4, 0x0d,
0x6e, 0xb0, 0x4a, 0x36, 0x1d, 0x34, 0x05, 0x68, 0x93, 0xba, 0x3d, 0x9b, 0x1e, 0x6f, 0x06, 0x08,
0x96, 0xb6, 0x4d, 0xe7, 0xec, 0x5b, 0xc6, 0x61, 0x90, 0xb6, 0x85, 0xd4, 0xbe, 0x65, 0x1c, 0xa2,
0xd7, 0x61, 0x81, 0xd8, 0x84, 0x5f, 0x64, 0x08, 0x54, 0x86, 0xa3, 0x8a, 0x01, 0x91, 0x81, 0xd4,
0xcf, 0x41, 0x69, 0x3a, 0x86, 0x3b, 0x19, 0x45, 0xd6, 0xfc, 0x5d, 0x40, 0x2c, 0x48, 0x6a, 0x36,
0x35, 0x0e, 0xb5, 0xa1, 0xee, 0xe8, 0x03, 0x36, 0x2e, 0xf1, 0xd4, 0xa4, 0x30, 0xce, 0x36, 0x35,
0x0e, 0x77, 0x24, 0x5d, 0xfd, 0x08, 0xa0, 0x37, 0x72, 0x89, 0x6e, 0x76, 0x58, 0x36, 0xc1, 0x4c,
0xc7, 0x5b, 0x9a, 0x29, 0x9f, 0xea, 0xa8, 0x2b, 0xb7, 0xba, 0x22, 0x18, 0x8d, 0x90, 0xae, 0xfe,
0x02, 0xdc, 0xe8, 0xda, 0xba, 0xc1, 0x9f, 0xad, 0xbb, 0xe1, 0xdb, 0x09, 0x7a, 0x00, 0x59, 0x01,
0x95, 0x2b, 0x19, 0xbb, 0xdd, 0xa6, 0x7d, 0x6e, 0xcd, 0x61, 0x89, 0xaf, 0x15, 0x01, 0xa6, 0x7a,
0xd4, 0x3f, 0x4b, 0x40, 0x3e, 0xd4, 0x8f, 0xca, 0xc0, 0x4a, 0x79, 0xe6, 0xde, 0x96, 0x23, 0x6b,
0xef, 0x3c, 0x8e, 0x92, 0x50, 0x0b, 0x0a, 0xa3, 0x50, 0xfa, 0xca, 0x7c, 0x2e, 0x66, 0xd4, 0x38,
0x2a, 0x8b, 0x3e, 0x86, 0x7c, 0xf0, 0x36, 0x1a, 0x44, 0xd8, 0xab, 0x9f, 0x52, 0xa7, 0x70, 0xf5,
0x53, 0x80, 0x1f, 0x52, 0xcb, 0xe9, 0xd3, 0x43, 0xe2, 0xf0, 0xb7, 0x3e, 0x56, 0x13, 0x92, 0xc0,
0x8a, 0xb2, 0xc5, 0x0b, 0x72, 0xb1, 0x04, 0xe1, 0x93, 0x97, 0x68, 0xaa, 0x7f, 0x9d, 0x84, 0x2c,
0xa6, 0xd4, 0xaf, 0x57, 0x51, 0x19, 0xb2, 0x32, 0x4e, 0xf0, 0xf3, 0xa7, 0x96, 0x3f, 0x3f, 0x5b,
0xcf, 0x88, 0x00, 0x91, 0x31, 0x78, 0x64, 0x88, 0x44, 0xf0, 0xe4, 0x65, 0x11, 0x1c, 0xdd, 0x85,
0xa2, 0x04, 0x69, 0x07, 0xba, 0x77, 0x20, 0x0a, 0xb4, 0xda, 0xe2, 0xf9, 0xd9, 0x3a, 0x08, 0xe4,
0x96, 0xee, 0x1d, 0x60, 0x10, 0x68, 0xf6, 0x8d, 0x9a, 0x50, 0xf8, 0x92, 0x5a, 0x8e, 0xe6, 0xf3,
0x49, 0xc8, 0x2b, 0xbf, 0xd8, 0x75, 0x9c, 0x4e, 0x55, 0x3e, 0x7c, 0xc3, 0x97, 0xd3, 0xc9, 0x37,
0x61, 0xc1, 0xa5, 0xd4, 0x17, 0x61, 0xcb, 0xa2, 0x8e, 0xbc, 0x4d, 0x28, 0xc7, 0x5e, 0x32, 0x53,
0xea, 0x63, 0x89, 0xc3, 0x45, 0x37, 0xd2, 0x42, 0x77, 0x61, 0xc5, 0xd6, 0x3d, 0x5f, 0xe3, 0xf1,
0xce, 0x9c, 0x6a, 0xcb, 0xf2, 0xad, 0x86, 0x18, 0x6f, 0x93, 0xb3, 0x02, 0x09, 0xf5, 0x1f, 0x13,
0x50, 0x60, 0x93, 0xb1, 0xf6, 0x2d, 0x83, 0x25, 0x79, 0xdf, 0x3e, 0xf7, 0xb8, 0x05, 0x29, 0xc3,
0x73, 0xa5, 0x51, 0xf9, 0xe1, 0x5b, 0xef, 0x61, 0xcc, 0x68, 0xe8, 0x73, 0xc8, 0xca, 0x5b, 0x0d,
0x91, 0x76, 0xa8, 0xd7, 0xa7, 0xa3, 0xd2, 0x36, 0x52, 0x8e, 0xfb, 0xf2, 0x74, 0x74, 0xe2, 0x10,
0xc0, 0x51, 0x12, 0xba, 0x09, 0x49, 0x43, 0x98, 0x4b, 0xfe, 0xb2, 0xa2, 0xde, 0xc6, 0x49, 0xc3,
0x51, 0xff, 0x2e, 0x01, 0x0b, 0xd3, 0x0d, 0xcf, 0x3c, 0xe0, 0x36, 0xe4, 0xbd, 0xf1, 0x9e, 0x37,
0xf1, 0x7c, 0x32, 0x0c, 0xde, 0x31, 0x43, 0x02, 0x6a, 0x41, 0x5e, 0xb7, 0x07, 0xd4, 0xb5, 0xfc,
0x83, 0xa1, 0xac, 0x44, 0xe3, 0x53, 0x85, 0xa8, 0xce, 0x4a, 0x35, 0x10, 0xc1, 0x53, 0xe9, 0xe0,
0xdc, 0x17, 0x8f, 0xdd, 0xfc, 0xdc, 0x7f, 0x0d, 0x8a, 0xb6, 0x3e, 0xe4, 0xd7, 0x3c, 0xbe, 0x35,
0x14, 0xf3, 0x48, 0xe3, 0x82, 0xa4, 0xf5, 0xad, 0x21, 0x51, 0x55, 0xc8, 0x87, 0xca, 0xd0, 0x12,
0x14, 0xaa, 0xcd, 0x9e, 0x76, 0x6f, 0xe3, 0x81, 0xf6, 0xb0, 0xbe, 0xa3, 0xcc, 0xc9, 0xdc, 0xf4,
0xcf, 0x13, 0xb0, 0x20, 0xc3, 0x91, 0xcc, 0xf7, 0x5f, 0x87, 0x79, 0x57, 0xdf, 0xf7, 0x83, 0x8a,
0x24, 0x2d, 0xbc, 0x9a, 0x45, 0x78, 0x56, 0x91, 0x30, 0x56, 0x7c, 0x45, 0x12, 0x79, 0x59, 0x4f,
0x5d, 0xf9, 0xb2, 0x9e, 0xfe, 0xb9, 0xbc, 0xac, 0xab, 0xbf, 0x06, 0xb0, 0x69, 0xd9, 0xa4, 0x2f,
0xee, 0x9a, 0xe2, 0xea, 0x4b, 0x96, 0xc3, 0xc9, 0x1b, 0xc7, 0x20, 0x87, 0x6b, 0x35, 0x30, 0xa3,
0x31, 0xd6, 0xc0, 0x32, 0xe5, 0x66, 0xe4, 0xac, 0x87, 0x8c, 0x35, 0xb0, 0xcc, 0xf0, 0x2d, 0x29,
0x7d, 0xdd, 0x5b, 0xd2, 0x69, 0x02, 0x96, 0x64, 0xee, 0x1a, 0x86, 0xdf, 0xb7, 0x21, 0x2f, 0xd2,
0xd8, 0x69, 0x41, 0xc7, 0x5f, 0x93, 0x05, 0xae, 0xd5, 0xc0, 0x39, 0xc1, 0x6e, 0x99, 0x68, 0x1d,
0x0a, 0x12, 0x1a, 0xf9, 0x15, 0x0e, 0x08, 0x52, 0x9b, 0x0d, 0xff, 0x7d, 0x48, 0xef, 0x5b, 0x36,
0x91, 0x8e, 0x1e, 0x1b, 0x00, 0xa6, 0x06, 0xd8, 0x9a, 0xc3, 0x1c, 0x5d, 0xcb, 0x05, 0x97, 0x71,
0x7c, 0x7c, 0xb2, 0xec, 0x8c, 0x8e, 0x4f, 0x54, 0xa0, 0x17, 0xc6, 0x27, 0x70, 0x6c, 0x7c, 0x82,
0x2d, 0xc6, 0x27, 0xa1, 0xd1, 0xf1, 0x09, 0xd2, 0xcf, 0x65, 0x7c, 0xdb, 0x70, 0xb3, 0x66, 0xeb,
0xc6, 0xa1, 0x6d, 0x79, 0x3e, 0x31, 0xa3, 0x11, 0x63, 0x03, 0xb2, 0x33, 0x49, 0xe7, 0x55, 0x97,
0xb3, 0x12, 0xa9, 0xfe, 0x5b, 0x02, 0x8a, 0x5b, 0x44, 0xb7, 0xfd, 0x83, 0xe9, 0xd5, 0x90, 0x4f,
0x3c, 0x5f, 0x1e, 0x56, 0xfc, 0x1b, 0x7d, 0x00, 0xb9, 0x30, 0x27, 0xb9, 0xf6, 0x95, 0x2c, 0x84,
0xa2, 0xfb, 0x30, 0xcf, 0xf6, 0x18, 0x1d, 0x07, 0xc5, 0xce, 0x55, 0x0f, 0x30, 0x12, 0xc9, 0x0e,
0x19, 0x97, 0xf0, 0x24, 0x84, 0xbb, 0x52, 0x06, 0x07, 0x4d, 0xf4, 0xff, 0xa1, 0xc8, 0xdf, 0x0f,
0x82, 0x9c, 0x2b, 0x73, 0x9d, 0xce, 0x82, 0x78, 0x02, 0x14, 0xf9, 0xd6, 0xff, 0x24, 0x60, 0x65,
0x47, 0x9f, 0xec, 0x11, 0x19, 0x36, 0x88, 0x89, 0x89, 0x41, 0x5d, 0x13, 0x75, 0xa3, 0xe1, 0xe6,
0x8a, 0x17, 0xc5, 0x38, 0xe1, 0xf8, 0xa8, 0x13, 0x14, 0x60, 0xc9, 0x48, 0x01, 0xb6, 0x02, 0x19,
0x87, 0x3a, 0x06, 0x91, 0xb1, 0x48, 0x34, 0x54, 0x2b, 0x1a, 0x6a, 0x4a, 0xe1, 0x63, 0x1f, 0x7f,
0xaa, 0x6b, 0x53, 0x3f, 0xec, 0x0d, 0x7d, 0x0e, 0xa5, 0x5e, 0xb3, 0x8e, 0x9b, 0xfd, 0x5a, 0xe7,
0x47, 0x5a, 0xaf, 0xba, 0xdd, 0xab, 0x6e, 0xdc, 0xd5, 0xba, 0x9d, 0xed, 0x2f, 0xee, 0xdd, 0xbf,
0xfb, 0x81, 0x92, 0x28, 0x95, 0x4f, 0x4e, 0xcb, 0xb7, 0xdb, 0xd5, 0xfa, 0xb6, 0xd8, 0x31, 0x7b,
0xf4, 0x69, 0x4f, 0xb7, 0x3d, 0x7d, 0xe3, 0x6e, 0x97, 0xda, 0x13, 0x86, 0x61, 0x6e, 0x5d, 0x8c,
0x9e, 0x57, 0xd1, 0x63, 0x38, 0x71, 0xe9, 0x31, 0x3c, 0x3d, 0xcd, 0x93, 0x97, 0x9c, 0xe6, 0x9b,
0xb0, 0x62, 0xb8, 0xd4, 0xf3, 0x34, 0x96, 0xfd, 0x13, 0xf3, 0x42, 0x7d, 0xf1, 0xd2, 0xf9, 0xd9,
0xfa, 0x72, 0x9d, 0xf1, 0x7b, 0x9c, 0x2d, 0xd5, 0x2f, 0x1b, 0x11, 0x12, 0xef, 0x49, 0xfd, 0xfd,
0x14, 0x4b, 0xa4, 0xac, 0x23, 0xcb, 0x26, 0x03, 0xe2, 0xa1, 0xc7, 0xb0, 0x64, 0xb8, 0xc4, 0x64,
0x69, 0xbd, 0x6e, 0x6b, 0xde, 0x88, 0x18, 0xd2, 0xa9, 0xff, 0x5f, 0x6c, 0x4e, 0x13, 0x0a, 0x56,
0xea, 0xa1, 0x54, 0x6f, 0x44, 0x0c, 0xbc, 0x68, 0xcc, 0xb4, 0xd1, 0x97, 0xb0, 0xe4, 0x11, 0xdb,
0x72, 0xc6, 0x4f, 0x35, 0x83, 0x3a, 0x3e, 0x79, 0x1a, 0xbc, 0x5b, 0x5d, 0xa7, 0xb7, 0xd7, 0xdc,
0x66, 0x52, 0x75, 0x21, 0x54, 0x43, 0xe7, 0x67, 0xeb, 0x8b, 0xb3, 0x34, 0xbc, 0x28, 0x35, 0xcb,
0x76, 0xa9, 0x0d, 0x8b, 0xb3, 0xa3, 0x41, 0x2b, 0x72, 0xef, 0xf3, 0x10, 0x12, 0xec, 0x6d, 0x74,
0x1b, 0x72, 0x2e, 0x19, 0x58, 0x9e, 0xef, 0x0a, 0x33, 0x33, 0x4e, 0x48, 0x61, 0x3b, 0x5f, 0xfc,
0x14, 0xa7, 0xf4, 0x2b, 0x70, 0xa1, 0x47, 0xb6, 0x59, 0x4c, 0xcb, 0xd3, 0xf7, 0xa4, 0xca, 0x1c,
0x0e, 0x9a, 0xcc, 0x07, 0xc7, 0x5e, 0x98, 0xa8, 0xf1, 0x6f, 0x46, 0xe3, 0x19, 0x85, 0xfc, 0x61,
0x12, 0xcf, 0x19, 0x82, 0x5f, 0x38, 0xa6, 0x23, 0xbf, 0x70, 0x5c, 0x81, 0x8c, 0x4d, 0x8e, 0x88,
0x2d, 0xce, 0x72, 0x2c, 0x1a, 0xef, 0xfc, 0x2c, 0x05, 0xf9, 0xf0, 0x8d, 0x86, 0x9d, 0x04, 0xed,
0xe6, 0x93, 0xc0, 0x57, 0x43, 0x7a, 0x9b, 0x1c, 0xa3, 0xd7, 0xa6, 0x77, 0x4a, 0x9f, 0x8b, 0x47,
0xe9, 0x90, 0x1d, 0xdc, 0x27, 0xbd, 0x01, 0xb9, 0x6a, 0xaf, 0xd7, 0x7a, 0xd8, 0x6e, 0x36, 0x94,
0xaf, 0x12, 0xa5, 0x97, 0x4e, 0x4e, 0xcb, 0xcb, 0x21, 0xa8, 0xea, 0x09, 0x57, 0xe2, 0xa8, 0x7a,
0xbd, 0xd9, 0xed, 0x37, 0x1b, 0xca, 0xb3, 0xe4, 0x45, 0x14, 0xbf, 0x23, 0xe1, 0x3f, 0x2d, 0xc9,
0x77, 0x71, 0xb3, 0x5b, 0xc5, 0xac, 0xc3, 0xaf, 0x92, 0xe2, 0xaa, 0x6b, 0xda, 0xa3, 0x4b, 0x46,
0xba, 0xcb, 0xfa, 0x5c, 0x0b, 0x7e, 0x62, 0xf5, 0x2c, 0x25, 0x7e, 0x7e, 0x30, 0x7d, 0x70, 0x22,
0xba, 0x39, 0x61, 0xbd, 0xf1, 0x97, 0x3e, 0xae, 0x26, 0x75, 0xa1, 0xb7, 0x1e, 0x8b, 0x24, 0x4c,
0x8b, 0x0a, 0xf3, 0x78, 0xb7, 0xdd, 0x66, 0xa0, 0x67, 0xe9, 0x0b, 0xb3, 0xc3, 0x63, 0x87, 0xd5,
0xbf, 0xe8, 0x0e, 0xe4, 0x82, 0x87, 0x40, 0xe5, 0xab, 0xf4, 0x85, 0x01, 0xd5, 0x83, 0x57, 0x4c,
0xde, 0xe1, 0xd6, 0x6e, 0x9f, 0xff, 0x02, 0xec, 0x59, 0xe6, 0x62, 0x87, 0x07, 0x63, 0xdf, 0xa4,
0xc7, 0x0e, 0xdb, 0x81, 0xf2, 0x56, 0xed, 0xab, 0x8c, 0xb8, 0x82, 0x08, 0x31, 0xf2, 0x4a, 0xed,
0x0d, 0xc8, 0xe1, 0xe6, 0x0f, 0xc5, 0x8f, 0xc5, 0x9e, 0x65, 0x2f, 0xe8, 0xc1, 0xe4, 0x4b, 0x62,
0xc8, 0xde, 0x3a, 0xb8, 0xbb, 0x55, 0xe5, 0x26, 0xbf, 0x88, 0xea, 0xb8, 0xa3, 0x03, 0xdd, 0x21,
0xe6, 0xf4, 0x37, 0x18, 0x21, 0xeb, 0x9d, 0x5f, 0x84, 0x5c, 0x90, 0x67, 0xa2, 0x35, 0xc8, 0x3e,
0xe9, 0xe0, 0x47, 0x4d, 0xac, 0xcc, 0x09, 0x1b, 0x06, 0x9c, 0x27, 0xa2, 0x42, 0x28, 0xc3, 0xfc,
0x4e, 0xb5, 0x5d, 0x7d, 0xd8, 0xc4, 0xc1, 0x85, 0x77, 0x00, 0x90, 0xc9, 0x52, 0x49, 0x91, 0x1d,
0x84, 0x3a, 0x6b, 0xab, 0x5f, 0x7f, 0xb3, 0x36, 0xf7, 0xd3, 0x6f, 0xd6, 0xe6, 0x9e, 0x9d, 0xaf,
0x25, 0xbe, 0x3e, 0x5f, 0x4b, 0xfc, 0xe4, 0x7c, 0x2d, 0xf1, 0xaf, 0xe7, 0x6b, 0x89, 0xbd, 0x2c,
0x0f, 0xe9, 0xf7, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x62, 0x46, 0x73, 0x55, 0x80, 0x2e, 0x00,
0x00,
}
|
<reponame>gcusnieux/jooby
package org.jooby.issues;
import org.jooby.Results;
import org.jooby.Session;
import org.jooby.test.ServerFeature;
import org.junit.Test;
import com.typesafe.config.ConfigFactory;
import com.typesafe.config.ConfigValueFactory;
public class Issue466 extends ServerFeature {
{
use(ConfigFactory.empty().withValue("application.secret",
ConfigValueFactory.fromAnyRef("1234Querty")));
cookieSession()
.cookie()
.maxAge(86400)
.name("user");
get("/466/home", req -> {
Session session = req.session();
return session.attributes();
});
get("/466/nosession", req -> {
return "OK";
});
get("/466/emptysession", req -> {
Session session = req.session();
return session.attributes();
});
get("/466/session", req -> {
Session session = req.session();
session.set("foo", "bar");
return session.attributes();
});
get("/466/destroy", req -> {
req.session().destroy();
return Results.redirect("/466/home");
});
}
@Test
public void shouldDestroyAllSessionData() throws Exception {
request()
.dontFollowRedirect()
.get("/466/session")
.expect("{foo=bar}");
request()
.dontFollowRedirect()
.get("/466/destroy")
.execute()
.header("Set-Cookie", "user=;Version=1;Path=/;HttpOnly;Max-Age=0;Expires=Thu, 01-Jan-1970 00:00:00 GMT");
}
@Test
public void shouldNotCreateSessionCookie() throws Exception {
request()
.dontFollowRedirect()
.get("/466/nosession")
.execute()
.header("Set-Cookie", (String) null);
}
@Test
public void shouldNotCreateEmptySessionCookie() throws Exception {
request()
.dontFollowRedirect()
.get("/466/emptysession")
.execute()
.header("Set-Cookie", (String) null);
}
@Test
public void shouldDestroyAllSessionDataFollowRedirect() throws Exception {
request()
.get("/466/session")
.expect("{foo=bar}");
request()
.get("/466/destroy")
.expect("{}");
}
}
|
#include "ivtentry.h"
#include <dos.h>
IVTEntry * IVTEntry::IVTable[256];
IVTEntry::IVTEntry(IVTNo ivtNo, interruptRoutine newEntryRoutine) : entryNum(ivtNo) {
#ifndef BCC_BLOCK_IGNORE
oldEntryRoutine = getvect(ivtNo);
setvect(ivtNo, newEntryRoutine);
#endif
kernelEvent = new KernelEv();
IVTable[ivtNo] = this;
}
IVTEntry::~IVTEntry() {
#ifndef BCC_BLOCK_IGNORE
setvect(entryNum, oldEntryRoutine);
#endif
oldEntryRoutine = 0;
delete kernelEvent;
kernelEvent = 0;
IVTable[entryNum] = 0;
}
KernelEv * IVTEntry::getKernelEvent(IVTNo ivtNo) { return IVTable[ivtNo]->kernelEvent; }
void IVTEntry::callOldEntryRoutine() {
oldEntryRoutine();
}
KernelEv * IVTEntry::getMyKernelEvent() { return kernelEvent; }
|
#!/bin/bash
# This script contains commands used for both Status Function App and client part
az='docker run --rm --name az -v /home/user/.azure:/root/.azure -v /tmp/az:/tmp/az -it mcr.microsoft.com/azure-cli az '
TENANT_ID=$($az account show --query tenantId --output tsv | sed -e 's/[^a-z0-9-]//g')
BE_API_APP_NAME=dev-dsaad-status
# For Func App only:
# Collect information about thr tenant
FEDERATION_METADATA_URL="https://login.microsoftonline.com/$TENANT_ID/FederationMetadata/2007-06/FederationMetadata.xml"
ISSUER_URL=$(curl $FEDERATION_METADATA_URL --silent | sed -n 's/.*entityID="\([^"]*\).*/\1/p')
# Create the application registration,
# defining a new application role and requesting access to read a user using the Graph API
BE_API_APP_ID=$($az ad app create --display-name $BE_API_APP_NAME --oauth2-allow-implicit-flow true \
--native-app false --reply-urls http://localhost --identifier-uris "http://$API_APP_NAME" \
--app-roles ' [ { "allowedMemberTypes": [ "User" ], "description":"Access to drone status", "displayName":"Get Drone Device Status", "isEnabled":true, "value":"GetStatus" }]' \
--required-resource-accesses ' [ { "resourceAppId": "00000003-0000-0000-c000-000000000000", "resourceAccess": [ { "id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d", "type": "Scope" } ] }]' \
--query appId --output tsv | sed -e 's/[^a-z0-9-]//g')
# Create a service principal for the registered application
$az ad sp create --id $BE_API_APP_ID
$az ad sp update --id $BE_API_APP_ID --add tags "WindowsAzureActiveDirectoryIntegratedApp"
# Configure the Function App
#az webapp auth update --resource-group $RESOURCEGROUP --name $DRONE_STATUS_FUNCTION_APP_NAME --enabled true \
#--action LoginWithAzureActiveDirectory \
#--aad-token-issuer-url $ISSUER_URL \
#--aad-client-id $API_APP_ID |
export { default } from './avatar.example';
|
<gh_stars>0
/*
* Grafana
* Grafana Restful API.
*
* OpenAPI spec version: v1.0
* Contact: <EMAIL>
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package cn.hashdata.grafana.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* DataSource
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-06-17T15:47:40.212Z")
public class DataSource {
@JsonProperty("access")
private String access = null;
@JsonProperty("basicAuth")
private Boolean basicAuth = null;
@JsonProperty("basicAuthPassword")
private String basicAuthPassword = null;
@JsonProperty("basicAuthUser")
private String basicAuthUser = null;
@JsonProperty("database")
private String database = null;
@JsonProperty("default")
private Boolean _default = null;
@JsonProperty("id")
private Long id = null;
@JsonProperty("jsonData")
private Object jsonData = null;
@JsonProperty("name")
private String name = null;
@JsonProperty("orgId")
private Long orgId = null;
@JsonProperty("password")
private String password = null;
@JsonProperty("readOnly")
private Boolean readOnly = null;
@JsonProperty("secureJsonFields")
private Map<String, Boolean> secureJsonFields = null;
@JsonProperty("type")
private String type = null;
@JsonProperty("typeLogoUrl")
private String typeLogoUrl = null;
@JsonProperty("url")
private String url = null;
@JsonProperty("user")
private String user = null;
@JsonProperty("version")
private Integer version = null;
@JsonProperty("withCredentials")
private Boolean withCredentials = null;
public DataSource access(String access) {
this.access = access;
return this;
}
/**
* Get access
* @return access
**/
@ApiModelProperty(value = "")
public String getAccess() {
return access;
}
public void setAccess(String access) {
this.access = access;
}
public DataSource basicAuth(Boolean basicAuth) {
this.basicAuth = basicAuth;
return this;
}
/**
* Get basicAuth
* @return basicAuth
**/
@ApiModelProperty(value = "")
public Boolean isBasicAuth() {
return basicAuth;
}
public void setBasicAuth(Boolean basicAuth) {
this.basicAuth = basicAuth;
}
public DataSource basicAuthPassword(String basicAuthPassword) {
this.basicAuthPassword = <PASSWORD>;
return this;
}
/**
* Get basicAuthPassword
* @return basicAuthPassword
**/
@ApiModelProperty(value = "")
public String getBasicAuthPassword() {
return basicAuthPassword;
}
public void setBasicAuthPassword(String basicAuthPassword) {
this.basicAuthPassword = <PASSWORD>;
}
public DataSource basicAuthUser(String basicAuthUser) {
this.basicAuthUser = basicAuthUser;
return this;
}
/**
* Get basicAuthUser
* @return basicAuthUser
**/
@ApiModelProperty(value = "")
public String getBasicAuthUser() {
return basicAuthUser;
}
public void setBasicAuthUser(String basicAuthUser) {
this.basicAuthUser = basicAuthUser;
}
public DataSource database(String database) {
this.database = database;
return this;
}
/**
* Get database
* @return database
**/
@ApiModelProperty(value = "")
public String getDatabase() {
return database;
}
public void setDatabase(String database) {
this.database = database;
}
public DataSource _default(Boolean _default) {
this._default = _default;
return this;
}
/**
* Get _default
* @return _default
**/
@ApiModelProperty(value = "")
public Boolean isDefault() {
return _default;
}
public void setDefault(Boolean _default) {
this._default = _default;
}
public DataSource id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public DataSource jsonData(Object jsonData) {
this.jsonData = jsonData;
return this;
}
/**
* Get jsonData
* @return jsonData
**/
@ApiModelProperty(value = "")
public Object getJsonData() {
return jsonData;
}
public void setJsonData(Object jsonData) {
this.jsonData = jsonData;
}
public DataSource name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public DataSource orgId(Long orgId) {
this.orgId = orgId;
return this;
}
/**
* Get orgId
* @return orgId
**/
@ApiModelProperty(value = "")
public Long getOrgId() {
return orgId;
}
public void setOrgId(Long orgId) {
this.orgId = orgId;
}
public DataSource password(String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
**/
@ApiModelProperty(value = "")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public DataSource readOnly(Boolean readOnly) {
this.readOnly = readOnly;
return this;
}
/**
* Get readOnly
* @return readOnly
**/
@ApiModelProperty(value = "")
public Boolean isReadOnly() {
return readOnly;
}
public void setReadOnly(Boolean readOnly) {
this.readOnly = readOnly;
}
public DataSource secureJsonFields(Map<String, Boolean> secureJsonFields) {
this.secureJsonFields = secureJsonFields;
return this;
}
public DataSource putSecureJsonFieldsItem(String key, Boolean secureJsonFieldsItem) {
if (this.secureJsonFields == null) {
this.secureJsonFields = new HashMap<>();
}
this.secureJsonFields.put(key, secureJsonFieldsItem);
return this;
}
/**
* Get secureJsonFields
* @return secureJsonFields
**/
@ApiModelProperty(value = "")
public Map<String, Boolean> getSecureJsonFields() {
return secureJsonFields;
}
public void setSecureJsonFields(Map<String, Boolean> secureJsonFields) {
this.secureJsonFields = secureJsonFields;
}
public DataSource type(String type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@ApiModelProperty(value = "")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public DataSource typeLogoUrl(String typeLogoUrl) {
this.typeLogoUrl = typeLogoUrl;
return this;
}
/**
* Get typeLogoUrl
* @return typeLogoUrl
**/
@ApiModelProperty(value = "")
public String getTypeLogoUrl() {
return typeLogoUrl;
}
public void setTypeLogoUrl(String typeLogoUrl) {
this.typeLogoUrl = typeLogoUrl;
}
public DataSource url(String url) {
this.url = url;
return this;
}
/**
* Get url
* @return url
**/
@ApiModelProperty(value = "")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public DataSource user(String user) {
this.user = user;
return this;
}
/**
* Get user
* @return user
**/
@ApiModelProperty(value = "")
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public DataSource version(Integer version) {
this.version = version;
return this;
}
/**
* Get version
* @return version
**/
@ApiModelProperty(value = "")
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public DataSource withCredentials(Boolean withCredentials) {
this.withCredentials = withCredentials;
return this;
}
/**
* Get withCredentials
* @return withCredentials
**/
@ApiModelProperty(value = "")
public Boolean isWithCredentials() {
return withCredentials;
}
public void setWithCredentials(Boolean withCredentials) {
this.withCredentials = withCredentials;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DataSource dataSource = (DataSource) o;
return Objects.equals(this.access, dataSource.access) &&
Objects.equals(this.basicAuth, dataSource.basicAuth) &&
Objects.equals(this.basicAuthPassword, dataSource.basicAuthPassword) &&
Objects.equals(this.basicAuthUser, dataSource.basicAuthUser) &&
Objects.equals(this.database, dataSource.database) &&
Objects.equals(this._default, dataSource._default) &&
Objects.equals(this.id, dataSource.id) &&
Objects.equals(this.jsonData, dataSource.jsonData) &&
Objects.equals(this.name, dataSource.name) &&
Objects.equals(this.orgId, dataSource.orgId) &&
Objects.equals(this.password, dataSource.password) &&
Objects.equals(this.readOnly, dataSource.readOnly) &&
Objects.equals(this.secureJsonFields, dataSource.secureJsonFields) &&
Objects.equals(this.type, dataSource.type) &&
Objects.equals(this.typeLogoUrl, dataSource.typeLogoUrl) &&
Objects.equals(this.url, dataSource.url) &&
Objects.equals(this.user, dataSource.user) &&
Objects.equals(this.version, dataSource.version) &&
Objects.equals(this.withCredentials, dataSource.withCredentials);
}
@Override
public int hashCode() {
return Objects.hash(access, basicAuth, basicAuthPassword, basicAuthUser, database, _default, id, jsonData, name, orgId, password, readOnly, secureJsonFields, type, typeLogoUrl, url, user, version, withCredentials);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DataSource {\n");
sb.append(" access: ").append(toIndentedString(access)).append("\n");
sb.append(" basicAuth: ").append(toIndentedString(basicAuth)).append("\n");
sb.append(" basicAuthPassword: ").append(toIndentedString(basicAuthPassword)).append("\n");
sb.append(" basicAuthUser: ").append(toIndentedString(basicAuthUser)).append("\n");
sb.append(" database: ").append(toIndentedString(database)).append("\n");
sb.append(" _default: ").append(toIndentedString(_default)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" jsonData: ").append(toIndentedString(jsonData)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n");
sb.append(" secureJsonFields: ").append(toIndentedString(secureJsonFields)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" typeLogoUrl: ").append(toIndentedString(typeLogoUrl)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" withCredentials: ").append(toIndentedString(withCredentials)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
<!DOCTYPE html>
<html>
<head>
<title>Hotel Room Booking</title>
<script src="room-booking.js"></script>
</head>
<body>
<h1>Hotel Room Booking</h1>
<form>
Room type: <input type="text" name="roomType"/><br/>
Check-in date: <input type="date" name="checkInDate"/><br/>
Check-out date: <input type="date" name="checkOutDate"/><br/>
<input type="button" value="Check Availability" onclick="checkAvailability()"/>
</form>
<div id="availability"></div>
</body>
</html> |
#!/bin/bash
PERIOD=75
CORRELATION=0.85
# LENGTHS="15"
# LENGTHS="17 12 8"
# LENGTHS="20 15 10 5"
# LENGTHS="5 10 15 20"
#LENGTHS="5 8 10 12 15 17 20"
LENGTHS="20 17 15 12 10 8 5"
BIN="relation13.py"
for LENGTH in ${LENGTHS}
do
for COUNTER in 1 2 3
# for COUNTER in 1
do
NAME="data-12-rescaled-cor${CORRELATION}-r${PERIOD}-s${LENGTH}-c70000-v0005"
PICKLE="${NAME}.pickle"
JSON="$NAME.json"
echo ${NAME} ${LENGTH} ${COUNTER}
python build_samples_library.py -i testing_data_examples/data-12 -c 70000 -r ${PERIOD} -s ${LENGTH} -l "${PICKLE}" -p "${JSON}" -v 0.0005
python ${BIN} -r "${PICKLE}" -s "${JSON}" -p > "${NAME}-${COUNTER}-past"
python ${BIN} -r "${PICKLE}" -s "${JSON}" -t > "${NAME}-${COUNTER}-train"
python ${BIN} -r "${PICKLE}" -s "${JSON}" > "${NAME}-${COUNTER}-future"
done
done
|
DIR=$(cd ../; pwd)
export GOPATH=$GOPATH:$DIR
GOOS=linux GOARCH=amd64 go build -o qdisklist main.go
GOOS=windows GOARCH=386 go build -o qdisklist.exe main.go
|
<gh_stars>0
//===-- ProcessGDBRemoteLog.h -----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_PROCESSGDBREMOTELOG_H
#define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_PROCESSGDBREMOTELOG_H
#include "lldb/Utility/Log.h"
namespace lldb_private {
namespace process_gdb_remote {
enum class GDBRLog : Log::MaskType {
Async = Log::ChannelFlag<0>,
Breakpoints = Log::ChannelFlag<1>,
Comm = Log::ChannelFlag<2>,
Memory = Log::ChannelFlag<3>, // Log memory reads/writes calls
MemoryDataLong = Log::ChannelFlag<4>, // Log all memory reads/writes bytes
MemoryDataShort = Log::ChannelFlag<5>, // Log short memory reads/writes bytes
Packets = Log::ChannelFlag<6>,
Process = Log::ChannelFlag<7>,
Step = Log::ChannelFlag<8>,
Thread = Log::ChannelFlag<9>,
Watchpoints = Log::ChannelFlag<10>,
LLVM_MARK_AS_BITMASK_ENUM(Watchpoints)
};
#define GDBR_LOG_PROCESS ::lldb_private::process_gdb_remote::GDBRLog::Process
#define GDBR_LOG_THREAD ::lldb_private::process_gdb_remote::GDBRLog::Thread
#define GDBR_LOG_PACKETS ::lldb_private::process_gdb_remote::GDBRLog::Packets
#define GDBR_LOG_MEMORY ::lldb_private::process_gdb_remote::GDBRLog::Memory
#define GDBR_LOG_MEMORY_DATA_SHORT \
::lldb_private::process_gdb_remote::GDBRLog::MemoryDataShort
#define GDBR_LOG_MEMORY_DATA_LONG \
::lldb_private::process_gdb_remote::GDBRLog::MemoryDataLong
#define GDBR_LOG_BREAKPOINTS \
::lldb_private::process_gdb_remote::GDBRLog::Breakpoints
#define GDBR_LOG_WATCHPOINTS \
::lldb_private::process_gdb_remote::GDBRLog::Watchpoints
#define GDBR_LOG_STEP ::lldb_private::process_gdb_remote::GDBRLog::Step
#define GDBR_LOG_COMM ::lldb_private::process_gdb_remote::GDBRLog::Comm
#define GDBR_LOG_ASYNC ::lldb_private::process_gdb_remote::GDBRLog::Async
class ProcessGDBRemoteLog {
public:
static void Initialize();
static Log *GetLogIfAllCategoriesSet(GDBRLog mask) { return GetLog(mask); }
static Log *GetLogIfAnyCategoryIsSet(GDBRLog mask) { return GetLog(mask); }
};
} // namespace process_gdb_remote
template <> Log::Channel &LogChannelFor<process_gdb_remote::GDBRLog>();
} // namespace lldb_private
#endif // LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_PROCESSGDBREMOTELOG_H
|
mkdir out
STEP_SECONDS=60
function promqlQuery() {
END_TIME=$(date -u +%s)
START_TIME=$(date -u --date="1 day ago" +%s)
oc exec -c prometheus -n openshift-monitoring prometheus-k8s-0 -- curl --data-urlencode "query=$1" --data-urlencode "step=$STEP_SECONDS" --data-urlencode "start=$START_TIME" --data-urlencode "end=$END_TIME" http://localhost:9090/api/v1/query_range
}
promqlQuery "rate(node_disk_read_time_seconds_total[1m])" > ./out/node_disk_read_time_seconds_total
promqlQuery "rate(node_disk_write_time_seconds_total[1m])" > ./out/node_disk_write_time_seconds_total
promqlQuery "rate(node_schedstat_running_seconds_total[1m])" > ./out/node_schedstat_running_seconds_total
promqlQuery "rate(node_schedstat_waiting_seconds_total[1m])" > ./out/node_schedstat_waiting_seconds_total
promqlQuery "rate(node_cpu_seconds_total[1m])" > ./out/node_cpu_seconds_total
promqlQuery "rate(node_network_receive_errs_total[1m])" > ./out/node_network_receive_errs_total
promqlQuery "rate(node_network_receive_drop_total[1m])" > ./out/node_network_receive_drop_total
promqlQuery "rate(node_network_receive_bytes_total[1m])" > ./out/node_network_receive_bytes_total
promqlQuery "rate(node_network_transmit_errs_total[1m])" > ./out/node_network_transmit_errs_total
promqlQuery "rate(node_network_transmit_drop_total[1m])" > ./out/node_network_transmit_drop_total
promqlQuery "rate(node_network_transmit_bytes_total[1m])" > ./out/node_network_transmit_bytes_total
promqlQuery "instance:node_cpu_utilisation:rate1m" > ./out/node_cpu_utilisation
promqlQuery "instance_device:node_disk_io_time_seconds:rate1m" > ./out/node_disk_io_time_seconds
promqlQuery "rate(node_disk_io_time_seconds_total[1m])" > ./out/node_disk_io_time_seconds_total
promqlQuery "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"etcd\"}[1m])) by (instance, le))" > ./out/etcd_disk_backend_commit_duration_seconds_bucket_.99
promqlQuery "histogram_quantile(0.999, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"etcd\"}[1m])) by (instance, le))" > ./out/etcd_disk_backend_commit_duration_seconds_bucket_.999
promqlQuery "histogram_quantile(0.9999, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"etcd\"}[1m])) by (instance, le))" > ./out/etcd_disk_backend_commit_duration_seconds_bucket_.9999
tar cfz metrics.tar.gz ./out
|
<gh_stars>0
package com.sweetkrista.redstonesensor.proxy;
public class ServerProxy extends CommonProxy {
}
|
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Grid, Container, Button } from '@material-ui/core';
export default function LivePreviewExample() {
return (
<>
<div className="rounded mb-spacing-6-x2 bg-asteroid">
<Container className="py-5">
<Grid container spacing={6} className="py-5">
<Grid item lg={4}>
<div className="feature-box px-3 text-white">
<div className="bg-strong-bliss text-center text-white font-size-xl d-50 rounded-circle btn-icon">
<FontAwesomeIcon icon={['fas', 'birthday-cake']} />
</div>
<h3 className="font-size-lg font-weight-bold mt-4">Blocks</h3>
<p className="text-white-50 mt-2">
Who are so beguiled and demoralized by the charms of pleasure.
</p>
<Button
size="small"
variant="outlined"
className="btn-secondary btn-pill shadow-none mt-3">
Continue reading
</Button>
</div>
</Grid>
<Grid item lg={4}>
<div className="feature-box px-3 text-white">
<div className="bg-plum-plate text-center text-white font-size-xl d-50 rounded-circle btn-icon">
<FontAwesomeIcon icon={['fas', 'bus-alt']} />
</div>
<h3 className="font-size-lg font-weight-bold mt-4">Pages</h3>
<p className="text-white-50 mt-2">
Which toil and pain can procure him some great pleasure.
</p>
<Button
size="small"
variant="outlined"
className="btn-secondary btn-pill shadow-none mt-3">
Continue reading
</Button>
</div>
</Grid>
<Grid item lg={4}>
<div className="feature-box px-3 text-white">
<div className="bg-arielle-smile text-center text-white font-size-xl d-50 rounded-circle btn-icon">
<FontAwesomeIcon icon={['fas', 'eye-dropper']} />
</div>
<h3 className="font-size-lg font-weight-bold mt-4">Widgets</h3>
<p className="text-white-50 mt-2">
To take a trivial example, which of us avoids pleasure, some
great pleasure.
</p>
<Button
size="small"
variant="outlined"
className="btn-secondary btn-pill shadow-none mt-3">
Continue reading
</Button>
</div>
</Grid>
</Grid>
</Container>
</div>
<div className="rounded mb-spacing-6-x2 bg-vicious-stance">
<Container className="py-5">
<Grid container spacing={6} className="py-5">
<Grid item lg={6}>
<div className="feature-box text-white">
<div className="bg-deep-blue text-center text-white font-size-xl d-50 rounded-circle btn-icon">
<FontAwesomeIcon icon={['fas', 'bomb']} />
</div>
<h3 className="font-size-lg font-weight-bold mt-4">Widgets</h3>
<p className="text-white-50 mt-2">
But I must explain to you how all this mistaken idea of
denouncing pleasure and praising pain was born and account of
the system.
</p>
<Button
size="small"
variant="outlined"
className="btn-secondary btn-pill shadow-none mt-1">
Continue reading
</Button>
</div>
</Grid>
<Grid item lg={6}>
<div className="feature-box text-white">
<div className="bg-grow-early text-center text-white font-size-xl d-50 rounded-circle btn-icon">
<FontAwesomeIcon icon={['fas', 'network-wired']} />
</div>
<h3 className="font-size-lg font-weight-bold mt-4">
Components
</h3>
<p className="text-white-50 mt-2">
The master-builder of human happiness. No one rejects,
dislikes, or avoids pleasure itself, because it is pleasure.
</p>
<Button
size="small"
variant="outlined"
className="btn-secondary btn-pill shadow-none mt-1">
Continue reading
</Button>
</div>
</Grid>
</Grid>
</Container>
</div>
</>
);
}
|
#!/usr/bin/env bash
case "$1" in
reinstall)
case "$2" in
lite)
KIBI="kibi-4-4-2-linux-x64-demo-lite-zip"
;;
full)
KIBI="kibi-4-4-2-linux-x64-demo-full-zip"
;;
*)
echo "Must specify kibi to restart, options are : [full, lite]"
exit 1
;;
esac
if [ -n "$(pgrep -u kibi)" ]; then
sudo kill -9 $(pgrep -u kibi)
fi
sudo rm -rf /opt/kibi
;;
full)
KIBI="kibi-4-4-2-linux-x64-demo-full-zip"
;;
*)
KIBI="kibi-4-4-2-linux-x64-demo-lite-zip"
;;
esac
if [ "$(ping -c 1 $MY_PRIVATE_REPO)" ]; then
SRC="$MY_PRIVATE_REPO/x86_64/src/kibi"
EPEL_BASE="$MY_PRIVATE_REPO/epel/x86_64/7/"
HQ_PLUGIN="$MY_PRIVATE_REPO/x86_64/src/kibi/elasticsearch-HQ-2.0.3.zip"
else
SRC="bit.do"
EPEL_BASE="http://download.fedoraproject.org/pub/epel/7/$basearch"
HQ_PLUGIN="https://github.com/royrusso/elasticsearch-HQ/archive/v2.0.3.zip"
fi
if [ ! -f "/tmp/$KIBI" ]; then
sudo curl -kL -o /tmp/$KIBI http://$SRC/$KIBI
fi
if [ ! "$(which node &> /dev/null)" ]; then
sudo yum makecache fast &> /dev/null
if [ ! "$(yum repolist all|grep -i epel)" ]; then
sudo echo "[epel]" > /etc/yum.repos.d/epel.repo
sudo echo "name=EPEL" >> /etc/yum.repos.d/epel.repo
sudo echo "baseurl=$EPEL_BASE" >> /etc/yum.repos.d/epel.repo
sudo echo "gpgcheck=0" >> /etc/yum.repos.d/epel.repo
fi
sudo yum -y install nodejs
fi
if [ ! "$(which java &> /dev/null)" ] || [ ! "$(readlink -f $(which java)|grep -q 1.8)" ]; then
sudo yum -y install java-1.8.0-openjdk
fi
if [ ! "$(which unzip &> /dev/null)" ]; then
sudo yum -y install unzip
fi
if [ ! "$(id kibi)" ]; then
echo "adding user kibi"
sudo useradd -d /opt/kibi -M -s /sbin/nologin kibi
fi
if [ ! -d "/opt/kibi" ]; then
sudo unzip -q /tmp/$KIBI -d /tmp/archive
sudo mv /tmp/archive/* /opt/kibi
sudo rmdir /tmp/archive
sudo chown -R kibi:kibi /opt/kibi
sudo sed -i s/'server.host: "localhost"'/'server.host: "0.0.0.0"'/g /opt/kibi/kibi/config/kibi.yml
sudo sed -i "s#elasticsearch\\.url.*#elasticsearch.url: \"http://$(facter ipaddress):9220\"#g" /opt/kibi/kibi/config/kibi.yml
sudo sed -i s/'# network.host: 192.168.0.1'/'network.host: _site_'/g /opt/kibi/elasticsearch/config/elasticsearch.yml
fi
sudo /sbin/service firewalld stop
echo "starting elasticsearch"
sudo -u kibi /opt/kibi/elasticsearch/bin/elasticsearch &
until [ -d "/opt/kibi/elasticsearch/logs" ]; do sleep 1; done
until [ "$(grep node /opt/kibi/elasticsearch/logs/*.log|grep started)" ]; do sleep 1; done
sudo /opt/kibi/elasticsearch/bin/plugin install $HQ_PLUGIN
sudo -u kibi /opt/kibi/kibi/bin/kibi 0<&- &>/dev/null &
echo "Kibi running at http://$(facter ipaddress):5606"
echo "Elastic HQ running at http://$(facter ipaddress):9220/_plugin/HQ"
|
// +build linux
// +build cgo
package shared
import (
"bufio"
"bytes"
"crypto/rand"
"crypto/sha256"
"crypto/tls"
"crypto/x509"
"encoding/hex"
"encoding/json"
"encoding/pem"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"os"
"path"
"path/filepath"
"strconv"
"strings"
"syscall"
"unsafe"
"github.com/chai2010/gettext-go/gettext"
"github.com/gorilla/websocket"
)
// #cgo LDFLAGS: -lutil -lpthread
/*
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <grp.h>
#include <pty.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
// This is an adaption from https://codereview.appspot.com/4589049, to be
// included in the stdlib with the stdlib's license.
static int mygetgrgid_r(int gid, struct group *grp,
char *buf, size_t buflen, struct group **result) {
return getgrgid_r(gid, grp, buf, buflen, result);
}
void configure_pty(int fd) {
struct termios term_settings;
struct winsize win;
if (tcgetattr(fd, &term_settings) < 0) {
printf("Failed to get settings: %s\n", strerror(errno));
return;
}
term_settings.c_iflag |= IMAXBEL;
term_settings.c_iflag |= IUTF8;
term_settings.c_iflag |= BRKINT;
term_settings.c_iflag |= IXANY;
term_settings.c_cflag |= HUPCL;
if (tcsetattr(fd, TCSANOW, &term_settings) < 0) {
printf("Failed to set settings: %s\n", strerror(errno));
return;
}
if (ioctl(fd, TIOCGWINSZ, &win) < 0) {
printf("Failed to get the terminal size: %s\n", strerror(errno));
return;
}
win.ws_col = 80;
win.ws_row = 25;
if (ioctl(fd, TIOCSWINSZ, &win) < 0) {
printf("Failed to set the terminal size: %s\n", strerror(errno));
return;
}
if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) {
printf("Failed to set FD_CLOEXEC: %s\n", strerror(errno));
return;
}
return;
}
void create_pty(int *master, int *slave, int uid, int gid) {
if (openpty(master, slave, NULL, NULL, NULL) < 0) {
printf("Failed to openpty: %s\n", strerror(errno));
return;
}
configure_pty(*master);
configure_pty(*slave);
if (fchown(*slave, uid, gid) < 0) {
printf("Warning: error chowning pty to container root\n");
printf("Continuing...\n");
}
if (fchown(*master, uid, gid) < 0) {
printf("Warning: error chowning pty to container root\n");
printf("Continuing...\n");
}
}
void create_pipe(int *master, int *slave) {
int pipefd[2];
if (pipe2(pipefd, O_CLOEXEC) < 0) {
printf("Failed to create a pipe: %s\n", strerror(errno));
return;
}
*master = pipefd[0];
*slave = pipefd[1];
}
*/
import "C"
const (
SYS_CLASS_NET = "/sys/class/net"
)
func OpenPty(uid, gid int) (master *os.File, slave *os.File, err error) {
fd_master := C.int(-1)
fd_slave := C.int(-1)
rootUid := C.int(uid)
rootGid := C.int(gid)
C.create_pty(&fd_master, &fd_slave, rootUid, rootGid)
if fd_master == -1 || fd_slave == -1 {
return nil, nil, errors.New("Failed to create a new pts pair")
}
master = os.NewFile(uintptr(fd_master), "master")
slave = os.NewFile(uintptr(fd_slave), "slave")
return master, slave, nil
}
func Pipe() (master *os.File, slave *os.File, err error) {
fd_master := C.int(-1)
fd_slave := C.int(-1)
C.create_pipe(&fd_master, &fd_slave)
if fd_master == -1 || fd_slave == -1 {
return nil, nil, errors.New("Failed to create a new pipe")
}
master = os.NewFile(uintptr(fd_master), "master")
slave = os.NewFile(uintptr(fd_slave), "slave")
return master, slave, nil
}
// VarPath returns the provided path elements joined by a slash and
// appended to the end of $LXD_DIR, which defaults to /var/lib/lxd.
func VarPath(path ...string) string {
varDir := os.Getenv("LXD_DIR")
if varDir == "" {
varDir = "/var/lib/lxd"
}
items := []string{varDir}
items = append(items, path...)
return filepath.Join(items...)
}
// LogPath returns the directory that LXD should put logs under. If LXD_DIR is
// set, this path is $LXD_DIR/logs, otherwise it is /var/log/lxd.
func LogPath(path ...string) string {
varDir := os.Getenv("LXD_DIR")
logDir := "/var/log/lxd"
if varDir != "" {
logDir = filepath.Join(varDir, "logs")
}
items := []string{logDir}
items = append(items, path...)
return filepath.Join(items...)
}
func ParseLXDFileHeaders(headers http.Header) (uid int, gid int, mode os.FileMode, err error) {
uid, err = strconv.Atoi(headers.Get("X-LXD-uid"))
if err != nil {
return 0, 0, 0, err
}
gid, err = strconv.Atoi(headers.Get("X-LXD-gid"))
if err != nil {
return 0, 0, 0, err
}
/* Allow people to send stuff with a leading 0 for octal or a regular
* int that represents the perms when redered in octal. */
rawMode, err := strconv.ParseInt(headers.Get("X-LXD-mode"), 0, 0)
if err != nil {
return 0, 0, 0, err
}
mode = os.FileMode(rawMode)
return uid, gid, mode, nil
}
func ReadToJSON(r io.Reader, req interface{}) error {
buf, err := ioutil.ReadAll(r)
if err != nil {
return err
}
return json.Unmarshal(buf, req)
}
func GenerateFingerprint(cert *x509.Certificate) string {
return fmt.Sprintf("% x", sha256.Sum256(cert.Raw))
}
func ReaderToChannel(r io.Reader) <-chan []byte {
ch := make(chan ([]byte))
go func() {
for {
/* io.Copy uses a 32KB buffer, so we might as well too. */
buf := make([]byte, 32*1024)
nr, err := r.Read(buf)
if nr > 0 {
ch <- buf[0:nr]
}
if err != nil {
close(ch)
break
}
}
}()
return ch
}
func WebsocketSendStream(conn *websocket.Conn, r io.Reader) chan bool {
ch := make(chan bool)
go func(conn *websocket.Conn, r io.Reader) {
in := ReaderToChannel(r)
for {
buf, ok := <-in
if !ok {
break
}
w, err := conn.NextWriter(websocket.BinaryMessage)
if err != nil {
Debugf("got error getting next writer %s", err)
break
}
_, err = w.Write(buf)
w.Close()
if err != nil {
Debugf("got err writing %s", err)
break
}
}
closeMsg := websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")
conn.WriteMessage(websocket.CloseMessage, closeMsg)
ch <- true
}(conn, r)
return ch
}
func WebsocketRecvStream(w io.WriteCloser, conn *websocket.Conn) chan bool {
ch := make(chan bool)
go func(w io.WriteCloser, conn *websocket.Conn) {
for {
mt, r, err := conn.NextReader()
if mt == websocket.CloseMessage {
Debugf("got close message for reader")
break
}
if err != nil {
Debugf("got error getting next reader %s, %s", err, w)
break
}
buf, err := ioutil.ReadAll(r)
if err != nil {
Debugf("got error writing to writer %s", err)
break
}
i, err := w.Write(buf)
if i != len(buf) {
Debugf("didn't write all of buf")
break
}
if err != nil {
Debugf("error writing buf %s", err)
break
}
}
ch <- true
}(w, conn)
return ch
}
// WebsocketMirror allows mirroring a reader to a websocket and taking the
// result and writing it to a writer.
func WebsocketMirror(conn *websocket.Conn, w io.WriteCloser, r io.Reader) chan bool {
done := make(chan bool, 2)
go func(conn *websocket.Conn, w io.WriteCloser) {
for {
mt, r, err := conn.NextReader()
if mt == websocket.CloseMessage {
Debugf("got close message for reader")
break
}
if err != nil {
Debugf("got error getting next reader %s, %s", err, w)
break
}
buf, err := ioutil.ReadAll(r)
if err != nil {
Debugf("got error writing to writer %s", err)
break
}
i, err := w.Write(buf)
if i != len(buf) {
Debugf("didn't write all of buf")
break
}
if err != nil {
Debugf("error writing buf %s", err)
break
}
}
done <- true
w.Close()
}(conn, w)
go func(conn *websocket.Conn, r io.Reader) {
in := ReaderToChannel(r)
for {
buf, ok := <-in
if !ok {
done <- true
conn.WriteMessage(websocket.CloseMessage, []byte{})
conn.Close()
return
}
w, err := conn.NextWriter(websocket.BinaryMessage)
if err != nil {
Debugf("got error getting next writer %s", err)
break
}
_, err = w.Write(buf)
w.Close()
if err != nil {
Debugf("got err writing %s", err)
break
}
}
closeMsg := websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")
conn.WriteMessage(websocket.CloseMessage, closeMsg)
done <- true
}(conn, r)
return done
}
// Returns a random base64 encoded string from crypto/rand.
func RandomCryptoString() (string, error) {
buf := make([]byte, 32)
n, err := rand.Read(buf)
if err != nil {
return "", err
}
if n != len(buf) {
return "", fmt.Errorf("not enough random bytes read")
}
return hex.EncodeToString(buf), nil
}
func ReadCert(fpath string) (*x509.Certificate, error) {
cf, err := ioutil.ReadFile(fpath)
if err != nil {
return nil, err
}
certBlock, _ := pem.Decode(cf)
return x509.ParseCertificate(certBlock.Bytes)
}
func SplitExt(fpath string) (string, string) {
b := path.Base(fpath)
ext := path.Ext(fpath)
return b[:len(b)-len(ext)], ext
}
func AtoiEmptyDefault(s string, def int) (int, error) {
if s == "" {
return def, nil
}
return strconv.Atoi(s)
}
// GroupName is an adaption from https://codereview.appspot.com/4589049.
func GroupName(gid int) (string, error) {
var grp C.struct_group
var result *C.struct_group
bufSize := C.size_t(C.sysconf(C._SC_GETGR_R_SIZE_MAX))
buf := C.malloc(bufSize)
if buf == nil {
return "", fmt.Errorf(gettext.Gettext("allocation failed"))
}
defer C.free(buf)
// mygetgrgid_r is a wrapper around getgrgid_r to
// to avoid using gid_t because C.gid_t(gid) for
// unknown reasons doesn't work on linux.
rv := C.mygetgrgid_r(C.int(gid),
&grp,
(*C.char)(buf),
bufSize,
&result)
if rv != 0 {
return "", fmt.Errorf(gettext.Gettext("failed group lookup: %s"), syscall.Errno(rv))
}
if result == nil {
return "", fmt.Errorf(gettext.Gettext("unknown group %s"), gid)
}
return C.GoString(result.gr_name), nil
}
// GroupId is an adaption from https://codereview.appspot.com/4589049.
func GroupId(name string) (int, error) {
var grp C.struct_group
var result *C.struct_group
bufSize := C.size_t(C.sysconf(C._SC_GETGR_R_SIZE_MAX))
buf := C.malloc(bufSize)
if buf == nil {
return -1, fmt.Errorf(gettext.Gettext("allocation failed"))
}
defer C.free(buf)
// mygetgrgid_r is a wrapper around getgrgid_r to
// to avoid using gid_t because C.gid_t(gid) for
// unknown reasons doesn't work on linux.
rv := C.getgrnam_r(C.CString(name),
&grp,
(*C.char)(buf),
bufSize,
&result)
if rv != 0 {
return -1, fmt.Errorf(gettext.Gettext("failed group lookup: %s"), syscall.Errno(rv))
}
if result == nil {
return -1, fmt.Errorf(gettext.Gettext("unknown group %s"), name)
}
return int(C.int(result.gr_gid)), nil
}
func ReadStdin() ([]byte, error) {
buf := bufio.NewReader(os.Stdin)
line, _, err := buf.ReadLine()
if err != nil {
return nil, err
}
return line, nil
}
func PathExists(name string) bool {
_, err := os.Lstat(name)
if err != nil && os.IsNotExist(err) {
return false
}
return true
}
func IsDir(name string) bool {
stat, err := os.Lstat(name)
if err != nil {
return false
}
return stat.IsDir()
}
func GetTLSConfig(certf string, keyf string) (*tls.Config, error) {
cert, err := tls.LoadX509KeyPair(certf, keyf)
if err != nil {
return nil, err
}
tlsConfig := &tls.Config{
InsecureSkipVerify: true,
ClientAuth: tls.RequireAnyClientCert,
Certificates: []tls.Certificate{cert},
MinVersion: tls.VersionTLS12,
MaxVersion: tls.VersionTLS12,
CipherSuites: []uint16{
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
PreferServerCipherSuites: true,
}
tlsConfig.BuildNameToCertificate()
return tlsConfig, nil
}
func WriteAll(w io.Writer, buf []byte) error {
return WriteAllBuf(w, bytes.NewBuffer(buf))
}
func WriteAllBuf(w io.Writer, buf *bytes.Buffer) error {
toWrite := int64(buf.Len())
for {
n, err := io.Copy(w, buf)
if err != nil {
return err
}
toWrite -= n
if toWrite <= 0 {
return nil
}
}
}
// CopyFile copies a file, overwriting the target if it exists.
func CopyFile(dest string, source string) error {
s, err := os.Open(source)
if err != nil {
return err
}
defer s.Close()
d, err := os.Create(dest)
if err != nil {
if os.IsExist(err) {
d, err = os.OpenFile(dest, os.O_WRONLY, 0700)
if err != nil {
return err
}
} else {
return err
}
}
defer d.Close()
_, err = io.Copy(d, s)
return err
}
/* Some interesting filesystems */
const (
tmpfsSuperMagic = 0x01021994
ext4SuperMagic = 0xEF53
xfsSuperMagic = 0x58465342
nfsSuperMagic = 0x6969
)
func GetFilesystem(path string) (string, error) {
fs := syscall.Statfs_t{}
err := syscall.Statfs(path, &fs)
if err != nil {
return "", err
}
switch fs.Type {
case btrfsSuperMagic:
return "btrfs", nil
case tmpfsSuperMagic:
return "tmpfs", nil
case ext4SuperMagic:
return "ext4", nil
case xfsSuperMagic:
return "xfs", nil
case nfsSuperMagic:
return "nfs", nil
default:
return string(fs.Type), nil
}
}
type BytesReadCloser struct {
Buf *bytes.Buffer
}
func (r BytesReadCloser) Read(b []byte) (n int, err error) {
return r.Buf.Read(b)
}
func (r BytesReadCloser) Close() error {
/* no-op since we're in memory */
return nil
}
func IsSnapshot(name string) bool {
return strings.Contains(name, "/")
}
func ReadLastNLines(f *os.File, lines int) (string, error) {
if lines <= 0 {
return "", fmt.Errorf("invalid line count")
}
stat, err := f.Stat()
if err != nil {
return "", err
}
data, err := syscall.Mmap(int(f.Fd()), 0, int(stat.Size()), syscall.PROT_READ, syscall.MAP_SHARED)
if err != nil {
return "", err
}
defer syscall.Munmap(data)
for i := len(data) - 1; i >= 0; i-- {
if data[i] == '\n' {
lines--
}
if lines < 0 {
return string(data[i+1 : len(data)]), nil
}
}
return string(data), nil
}
func IsBridge(iface *net.Interface) bool {
p := path.Join(SYS_CLASS_NET, iface.Name, "bridge")
stat, err := os.Stat(p)
if err != nil {
return false
}
return stat.IsDir()
}
func IsLoopback(iface *net.Interface) bool {
return int(iface.Flags&net.FlagLoopback) > 0
}
func SetSize(fd int, width int, height int) (err error) {
var dimensions [4]uint16
dimensions[0] = uint16(height)
dimensions[1] = uint16(width)
if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), uintptr(syscall.TIOCSWINSZ), uintptr(unsafe.Pointer(&dimensions)), 0, 0, 0); err != 0 {
return err
}
return nil
}
func ReadDir(p string) ([]string, error) {
ents, err := ioutil.ReadDir(p)
if err != nil {
return []string{}, err
}
var ret []string
for _, ent := range ents {
ret = append(ret, ent.Name())
}
return ret, nil
}
func GetFileStat(p string) (uid int, gid int, major int, minor int,
inode uint64, nlink int, err error) {
var stat syscall.Stat_t
err = syscall.Lstat(p, &stat)
if err != nil {
return
}
uid = int(stat.Uid)
gid = int(stat.Gid)
inode = uint64(stat.Ino)
nlink = int(stat.Nlink)
major = -1
minor = -1
if stat.Mode&syscall.S_IFBLK != 0 || stat.Mode&syscall.S_IFCHR != 0 {
major = int(stat.Rdev/256)
minor = int(stat.Rdev%256)
}
return
}
|
package org.spongepowered.spunbric.mod;
import com.google.inject.Inject;
import org.spongepowered.api.Game;
import org.spongepowered.api.GameState;
import org.spongepowered.api.SystemSubject;
import org.spongepowered.api.client.Client;
import org.spongepowered.api.scheduler.Scheduler;
import org.spongepowered.api.server.Server;
import org.spongepowered.spunbric.launch.FabricLaunch;
import org.spongepowered.spunbric.mod.entry.AbstractSpunbricMod;
import java.nio.file.Path;
/*
* Fabric can have client instances of the game.
* The three abstract method should be overwritten accordingly.
*/
public abstract class AbstractFabricGame implements Game {
@Inject
protected AbstractFabricGame() {
}
@Override
public abstract boolean isClientAvailable();
/**
* Fabric can run on both client and server. This is handled in the side specific game.
*/
@Override
public abstract Client getClient();
@Override
public abstract boolean isServerAvailable();
@Override
public GameState getState() {
return null;
}
@Override
public Scheduler getAsyncScheduler() {
return null;
}
public Path getGameDirectory() {
return FabricLaunch.getGameDir();
}
@Override
public Server getServer() {
if (AbstractSpunbricMod.getMod().getServer() != null) {
return (Server) AbstractSpunbricMod.getMod().getServer();
}
throw new IllegalStateException("Server is not available.");
}
@Override
public SystemSubject getSystemSubject() {
return null;
}
}
|
#!/bin/bash
# file start.sh
# start script for Wznm operation daemon(s), release wznmopd1_mac
# copyright: (C) 2016-2020 MPSI Technologies GmbH
# author: Alexander Wirthmueller (auto-generation)
# date created: 12 Mar 2021
# IP header --- ABOVE
num='^[0-9]+$'
if [ "$#" -eq 0 ] ; then
nohup ./Wznmopd1 &
disown
elif [ "$#" -eq 1 ] && [[ "$1" =~ $num ]] ; then
i=0
while [ $i -lt "$1" ]
do
nohup ./Wznmopd1 -engsrvportofs=$i &
i=`expr $i + 1`
done
disown
else
echo "usage: $0 <N>" >&2
exit 1
fi
|
/* ErrorId.cpp */
//----------------------------------------------------------------------------------------
//
// Project: Book Convertor 1.00
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
// Copyright (c) 2018 <NAME>. All rights reserved.
//
//----------------------------------------------------------------------------------------
#include <inc/ErrorId.h>
namespace App {
/* class ErrorId */
StrLen ErrorId::BoolFunc(int code)
{
return code?"Error"_c:"Ok"_c;
}
} // namespace App
|
import React, { useState } from 'react';
import { NavLink as RRNavLink } from 'react-router-dom';
import {
Collapse, Navbar, NavbarToggler, Nav, NavItem, NavLink,
} from 'reactstrap';
const CollapsableNav = () => {
const [collapsed, setCollapsed] = useState(true);
const toggleNavbar = () => setCollapsed(!collapsed);
return (
<div>
<Navbar light>
<NavbarToggler onClick={toggleNavbar} className="mr-2" />
<Collapse isOpen={!collapsed} navbar>
<Nav>
<NavItem><NavLink to="/" exact activeClassName="active" tag={RRNavLink} onClick={toggleNavbar}>Home</NavLink></NavItem>
</Nav>
</Collapse>
</Navbar>
</div>
);
};
export default CollapsableNav;
|
One way to encrypt a given plaintext is to use the Caesar cipher. This involves shifting all the letters in the plaintext by a certain key (number of positions) in the alphabet. For example, if the key is 3, all the letters will be shifted 3 places to the right in the alphabet. |
#!/bin/bash
source "${HOME}/.bashrc"
if [ -n "${snippet:-}" ]; then
navi alfred suggestions
else
navi alfred start
fi
|
package org.fluentlenium.cucumber.adapter;
import cucumber.api.Scenario;
import org.fluentlenium.adapter.FluentTestRunnerAdapter;
import org.fluentlenium.adapter.util.DefaultCookieStrategyReader;
public class FluentCucumberTest extends FluentTestRunnerAdapter {
public FluentCucumberTest() {
super(new CucumberSharedDriverStrategyReader(), new DefaultCookieStrategyReader());
}
// It's not allowed by Cucumber JVM to add @Before in the base class.
public void before(Scenario scenario) {
starting(scenario.getName());
}
// It's not allowed by Cucumber JVM to add @After in the base class.
public void after(Scenario scenario) {
if (scenario.isFailed()) {
failed(scenario.getName());
}
finished(scenario.getName());
}
// FluentTestRunnerAdapter#releaseSharedDriver is not called. I don't know when to call it, sadly ...
}
|
import * as React from "react";
import EditForm from "../../components/form/EditForm";
import { InputFactory, DateInputFactory, SelectInputFactory } from "../../components/form/FormElements";
import { Digits, NotEmpty } from "../../components/form/Constraints";
import { SelectFormElement } from "../../components/form/types";
import { PetData, PetType } from "../types";
type PetFormProps = {
initialPet: PetData;
pettypes: PetType[];
formTitle: string;
onFormSubmit: (pet: PetData) => void | Promise<string | void>;
};
const PetForm = ({ formTitle, initialPet, pettypes, onFormSubmit }: PetFormProps) => {
return (
<EditForm
formTitle={formTitle}
initialModel={initialPet}
onFormSubmit={onFormSubmit}
formElements={[
{
name: "name",
label: "Name",
constraint: NotEmpty,
elementComponentFactory: InputFactory
},
{
elementComponentFactory: DateInputFactory,
name: "birthDate",
label: "Birthdate",
constraint: NotEmpty
},
{
elementComponentFactory: SelectInputFactory,
name: "type",
label: "Types",
options: pettypes,
constraint: NotEmpty
} as SelectFormElement
]}
/>
);
};
export default PetForm;
|
<reponame>wanyicheng1024/nand2tetris
const fs = require('fs');
const parser = require('./Parser');
let fileName = process.argv[2];
fs.readFile(fileName, 'utf-8', (err, data) => {
if (err) {
throw err;
}
data = data.split('\r\n');
// parser([...data], true);
const binaryOut = parser(data);
fileName = fileName.split('.')[0];
fs.writeFile(fileName + '.hack', binaryOut, (err) => {
if (err) {
throw err;
}
})
})
|
# checkout the magick.net source based on tag
artifactsDir="/mnt/repo/artifacts/"
magick_tag=$1
magick_quantum=$2
magick_hdri=$3
echo "Going to build Magick of tag $magick_tag, quantum $magick_quantum and HDRI $magick_hdri"
git clone https://github.com/dlemstra/Magick.NET.git
cd Magick.NET
git checkout tags/"$magick_tag"
git clean -fdx
# use the script to checkout the corresponding native magick
cd ImageMagick/Source
./Checkout.sh
cd ImageMagick/ImageMagick/
cp /mnt/repo/stupid_checkout.sh $PWD
chmod +x stupid_checkout.sh
dos2unix stupid_checkout.sh
./stupid_checkout.sh
# fix libs resolution
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
# build the native part
magick_prefix="$artifactsDir"imagemagick_built
./configure --with-magick-plus-plus=no \
--with-quantum-depth="$magick_quantum" \
--with-jpeg \
--with-png \
--with-webp \
--with-lcms \
--with-zlib \
--without-pango \
--without-x \
--without-fontconfig \
--disable-shared \
--with-pic \
--enable-delegate-build \
--enable-hdri="$magick_hdri"
make
make install
libMagickNetNativeOutDir="$artifactsDir"libMagick.NET-x64.Native
# build the wrapper
cd ../../../../Source/Magick.NET.Native/
cp /mnt/repo/CMakeLists.txt $PWD
cmake . -DIMAGEMAGICK_PREFIX="$magick_prefix" -DQUANTUM_DEPTH="$magick_quantum" -DHDRI="$magick_hdri"
make
mkdir -p "$libMagickNetNativeOutDir"
cp ./libMagick.NET-Q"$magick_quantum"-x64.Native.dll.so "$libMagickNetNativeOutDir"
# copy all the required binaries to the output directory
OUT_DIR="$artifactsDir"resultingOutPut/
OUT_FILES="$libMagickNetNativeOutDir/libMagick.NET-Q$magick_quantum-x64.Native.dll.so"
mkdir -p $OUT_DIR
cp $OUT_FILES $OUT_DIR |
import { Sequelize } from 'sequelize'
import config from '../config';
const db = new Sequelize(
config.database.name,
config.database.user,
config.database.pass, {
host: config.database.host,
port: config.database.port,
dialect: config.database.driver
});
export default db; |
<gh_stars>10-100
import type { Handler } from '@lib/i18n/structures/Handler';
import { EnUsHandler } from './en-US/constants';
import { NlNLHandler } from './nl-NL/constants';
import { PtPTHandler } from './pt-PT/constants';
export const handlers = new Map<string, Handler>([
['en-US', new EnUsHandler()],
['nl-NL', new NlNLHandler()],
['pt-PT', new PtPTHandler()]
]);
export function getHandler(lang: string) {
return handlers.get(lang) ?? new EnUsHandler();
}
|
#!/usr/bin/env bash
source "scripts/master_env.sh"
exp_id="aic20_t2_trip_res50"
python main.py \
--gpu_id $GPUID \
-w $N_WORKERS \
--dataset_cfg "./configs/dataset_cfgs/aic20_vehicle_reid.yaml" \
--model_cfg "./configs/model_cfgs/${exp_id}.yaml" \
--train_cfg "./configs/train_cfgs/${exp_id}.yaml" \
--logdir "logs/${exp_id}" \
--log_fname "logs/${exp_id}/stdout.log" \
--train_mode "from_scratch" \
--is_training true \
# --pretrained_model_path "logs/${exp_id}/best.model" \
# --output "outputs/${exp_id}/"
|
// No exception should be thrown
import Foo, { baz } from "./moduleWithGetter";
expect(baz).toBe(123);
|
#!/bin/sh
#SBATCH --job-name=finetune_gpt2_shakespeare_0
#SBATCH -o style_paraphrase/logs/log_shakespeare_0.txt
#SBATCH --time=167:00:00
#SBATCH --partition=m40-long
#SBATCH --gres=gpu:1
#SBATCH --cpus-per-task=3
#SBATCH --mem=50GB
#SBATCH -d singleton
# Experiment Details :- GPT2-large model for shakespeare.
# Run Details :- accumulation = 2, batch_size = 5, beam_size = 1, cpus = 3, dataset = datasets/shakespeare, eval_batch_size = 1, global_dense_feature_list = none, gpu = m40, learning_rate = 5e-5, memory = 50, model_name = gpt2-large, ngpus = 1, num_epochs = 3, optimizer = adam, prefix_input_type = paraphrase_250, save_steps = 500, save_total_limit = -1, specific_style_train = 0, stop_token = eos
### save_steps = original 500
export DATA_DIR=datasets/abstract
BASE_DIR=style_paraphrase
python -m torch.distributed.launch --nproc_per_node=1 $BASE_DIR/run_lm_finetuning.py \
--output_dir=$BASE_DIR/saved_models/model_abstract_0 \
--model_type=kogpt2 \
--model_name_or_path=gpt2-large \
--do_train \
--data_dir=$DATA_DIR \
--save_steps 500 \
--logging_steps 20 \
--save_total_limit -1 \
--evaluate_during_training \
--num_train_epochs 3 \
--gradient_accumulation_steps 2 \
--per_gpu_train_batch_size 5 \
--job_id abstract_0 \
--learning_rate 5e-5 \
--prefix_input_type paraphrase_250 \
--global_dense_feature_list none \
--specific_style_train 0 \
--optimizer adam \
--overwrite_output_dir
|
import {async, ComponentFixture, inject, TestBed} from '@angular/core/testing';
import {Component, NgModule} from '@angular/core';
import {CoreTestModule} from 'projects/commons/src/lib/core/core.module.spec';
import {TabsModule} from 'projects/tabs/src/lib/tabs.module';
import {BusEvent} from 'projects/event/src/lib/bus-event';
import {TabsContentComponent} from 'projects/tabs/src/lib/tabs-content/tabs-content.component';
import {newTestTab} from 'projects/tabs/src/lib/tab-header/tab-header.component.spec';
import {EventBusService} from 'projects/event/src/lib/event-bus.service';
import {TabSelectedEvent} from 'projects/tabs/src/lib/tab-selected-event';
import {LocalStorageService} from 'projects/tools/src/lib/local-storage.service';
import {TabUnselectedEvent} from 'projects/tabs/src/lib/tab-unselected-event';
import {localStorageServiceSpy} from 'projects/tools/src/lib/local-storage.service.spec';
import Spy = jasmine.Spy;
import {SelectHelpEvent} from 'projects/help/src/lib/help-panel/select-help-event';
@Component({
selector: 'lib-test',
template: `test`
})
class TestComponent {
}
@NgModule({
imports: [CoreTestModule, TabsModule],
declarations: [TestComponent],
entryComponents: [
TestComponent,
],
})
class TestModule {
}
class TestEvent extends BusEvent {
constructor() {
super('test');
}
}
describe('TabsContentComponent', () => {
let component: TabsContentComponent;
let fixture: ComponentFixture<TabsContentComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [TestModule],
providers: [
{provide: LocalStorageService, useValue: localStorageServiceSpy()}
]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TabsContentComponent);
component = fixture.componentInstance;
component.id = 'test';
component.tabs = [
newTestTab(TestComponent),
];
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should fire _selection event on creation', inject([EventBusService], (eventBus: EventBusService) => {
const publish = spyOn(eventBus, 'publish');
component.defaultTabIndex = 0;
component.ngOnInit();
expect(publish).toHaveBeenCalledWith(new TabSelectedEvent(component.selectedTab));
}));
it('should selectOn', inject([EventBusService], (service: EventBusService) => {
component.selectedTab = null;
const spy = spyOn(component, 'selectTab');
service.publish(new TestEvent());
expect(spy).toHaveBeenCalledWith(0);
}));
it('should not selectOn', inject([EventBusService], (service: EventBusService) => {
component.selectedTab = component.tabs[0];
const spy = spyOn(component, 'selectTab');
service.publish(new TestEvent());
expect(spy).not.toHaveBeenCalled();
}));
it('should load conf from storage', inject([LocalStorageService], (storage: LocalStorageService) => {
(storage.getNumber as Spy).and.returnValue(0);
component.ngOnInit();
expect(component.selectedTab).toBe(component.tabs[0]);
}));
it('should load default conf', inject([LocalStorageService], (storage: LocalStorageService) => {
(storage.getNumber as Spy).and.returnValue(-1);
component.ngOnInit();
expect(component.selectedTab).toBeUndefined();
}));
it('should selectTab', inject([LocalStorageService, EventBusService], (storage: LocalStorageService, eventBus: EventBusService) => {
const publish = spyOn(eventBus, 'publish');
const emit = spyOn(component.tabSelected, 'emit');
component.selectTab(0);
expect(component.selectedTab).toBe(component.tabs[0]);
expect(storage.set).toHaveBeenCalledWith(component.id, 0);
expect(emit).toHaveBeenCalledWith([0, component.tabs[0]]);
expect(publish).toHaveBeenCalledWith(new TabSelectedEvent(component.selectedTab));
expect(publish).toHaveBeenCalledWith(new SelectHelpEvent('TEST'));
}));
it('should other selectTab', inject([LocalStorageService, EventBusService], (storage: LocalStorageService, eventBus: EventBusService) => {
const publish = spyOn(eventBus, 'publish');
const emit = spyOn(component.tabSelected, 'emit');
const otherTab = newTestTab(TestComponent);
component.selectedTab = otherTab;
component.selectTab(0);
expect(component.selectedTab).toBe(component.tabs[0]);
expect(storage.set).toHaveBeenCalledWith(component.id, 0);
expect(emit).toHaveBeenCalledWith([0, component.tabs[0]]);
expect(publish).toHaveBeenCalledWith(new TabSelectedEvent(component.tabs[0]));
expect(publish).toHaveBeenCalledWith(new TabUnselectedEvent(otherTab));
}));
it('should unselectTab', inject([LocalStorageService, EventBusService], (storage: LocalStorageService, eventBus: EventBusService) => {
const publish = spyOn(eventBus, 'publish');
const tab = component.selectedTab = component.tabs[0];
const emit = spyOn(component.tabUnselected, 'emit');
component.unselectTab();
expect(component.selectedTab).toBeNull();
expect(storage.set).toHaveBeenCalledWith(component.id, -1);
expect(emit).toHaveBeenCalled();
expect(publish).toHaveBeenCalledWith(new TabUnselectedEvent(tab));
}));
it('should unselectTab do nothing', inject([LocalStorageService], (storage: LocalStorageService) => {
component.selectedTab = null;
const emit = spyOn(component.tabUnselected, 'emit');
component.unselectTab();
expect(emit).not.toHaveBeenCalled();
}));
});
|
<filename>Schemas/prefixSchema.ts<gh_stars>0
"use strict";
import mongoose from "mongoose";
const commandPrefixSchema = new mongoose.Schema({
_id: {
type: String,
required: true,
},
prefix: {
type: String,
required: true,
},
});
const PrefixSchema = mongoose.model<IprefixSchema>(
"guild-prefixes",
commandPrefixSchema
);
export default PrefixSchema;
interface IprefixSchema extends mongoose.Document {
_id: string;
prefix: string;
}
|
<reponame>bradmccoydev/keptn
package model
type Error struct {
Code int `json:"code,omitempty"`
Message *string `json:"message"`
}
|
<filename>src/domain/networking/SocketType.ts<gh_stars>10-100
//
// SocketType.ts
//
// Created by <NAME> on 1 Sep 2021.
// Copyright 2021 Vircadia contributors.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
/*@devdoc
* A {@link SocketType(1)|socket type} is the type of network {@link Socket} used for Vircadia protocol communications:
* <code>WebRTC</code>, <code>UDP</code>, or <code>Unknown</code>. Socket type values are represented as 8-bit numbers
* in the protocol packets.
* @typedef {number} SocketType
*/
const enum SocketTypeValue {
// C++ SocketType : uint8_t
Unknown = 0,
UDP = 1,
WebRTC = 2
}
/*@devdoc
* The <code>SocketType</code> namespace provides information on a the types of network {@link Socket} used for Vircadia
* protocol communications. In this SDK, only <code>WebRTC</code> sockets are used.
* <p>C++: <code>SocketType</code></p>
*
* @namespace SocketType
* @variation 1
*
* @property {SocketType} Unknown - <code>0</code> - Unknown socket type.
* @property {SocketType} UDP - <code>1</code> - UDP socket. Not used in the Vircadia Web SDK.
* @property {SocketType} WebRTC - <code>2</code> - WebRTC socket. A WebRTC data channel presented as a UDP-style socket.
*/
const SocketType = new class {
// C++ SocketType
readonly Unknown = SocketTypeValue.Unknown;
readonly UDP = SocketTypeValue.UDP;
readonly WebRTC = SocketTypeValue.WebRTC;
readonly #_UNKNOWN = "Unknown";
readonly #_UDP = "UDP";
readonly #_WEBRTC = "WebRTC";
readonly #_SOCKET_TYPE_STRINGS = [this.#_UNKNOWN, this.#_UDP, this.#_WEBRTC];
/*@devdoc
* Gets the name of a SocketType value, e.g., <code>"WebRTC"</code>.
* @function SocketType(1).socketTypeToString
* @param {SocketType} socketType - The socket type value.
* @returns {string} The name of the socket type value.
*/
socketTypeToString(socketType: SocketTypeValue): string {
// C++ QString socketTypeToString(SocketType socketType)
// Provided as a global function in C++ but as a method of the SocketType namespace in TypeScript.
const value = this.#_SOCKET_TYPE_STRINGS[socketType];
return value ? value : this.#_UNKNOWN;
}
}();
export { SocketType as default, SocketTypeValue };
|
package com.algorithm.file;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
/**
* @author zhangwanli
* @description
* @date 2018-03-26 下午1:52
*/
public class Files {
/**
* 读取某个文件夹下的所有文件
*/
public static boolean readfile(String filepath) throws IOException {
try {
File file = new File(filepath);
if (file.isDirectory()) {
System.out.println("文件夹");
System.out.println("path=" + file.getPath());
String[] filelist = file.list();
for (int i = 0; i < filelist.length; i++) {
readfile(filepath + "/" + filelist[i]);
}
} else {
System.out.println("文件");
System.out.println("path=" + file.getPath());
}
} catch (FileNotFoundException e) {
System.out.println("readfile() Exception:" + e.getMessage());
}
return true;
}
}
|
#!/bin/sh
#
# repodetect.sh - determine kickstart repos based on your OS
#
# Usage: repodetect.sh VERSION [YUM_SERVER] [LINUX_DIST]
#
# VERSION Major OS version number (e.g., '8', '7')
# YUM_SERVER (Optional) empty, 'local', or a URI of a yum server
# LINUX_DIST (Optional) Forces Linux distro (e.g., 'CentOS', 'RedHat')
#
# Supported OSes: LINUX_DIST: [CentOS, RedHat], VERSION: [7, 8]
#
unknown="REPODETECT_UNKNOWN_OS_TYPE"
distro="$unknown"
arch="x86_64"
version="$1"
yum_server="$2"
if [ $# -gt 2 ]; then distro="$3"; fi
arch="$(uname -m)" # (e.g., "x86_64")
if [ -z "$version" ]; then
echo "ERROR: You must pass the major OS VERSION (e.g., '8','7') as the first argument"
exit 1
fi
if [ "$distro" == "$unknown" ]; then
osline="$(dmesg -s 10485760 | grep '(Kernel Module GPG key)')" ||:
if grep -q 'Red Hat' /etc/redhat-release \
|| grep -q "url is.*RedHat" /tmp/anaconda.log \
|| [[ "$osline" =~ RedHat ]] \
|| [ -f /tmp/RedHat.osbuild ]
then
distro=RedHat
elif grep -q 'CentOS' /etc/redhat-release \
|| grep -q "url is.*CentOS" /tmp/anaconda.log \
|| [[ "$osline" =~ CentOS ]] \
|| [ -f /tmp/CentOS.osbuild ]
then
distro=CentOS
elif [ "$distro" == "$unknown" ]; then
echo "WARNING: Unable to determine distro of OS; Assuming CentOS"
distro=CentOS
fi
fi
if [ -z "$yum_server" ] || [ "$yum_server" == 'local' ]; then
uri_header="file:///mnt/source"
if [ "$version" == "7" ]; then
local_header=$uri_header/SIMP/$arch
else
local_header="$uri_header/SimpRepos"
fi
else
uri_header="https://$yum_server/yum/$distro/$version/$arch"
local_header="https://$yum_server/yum/SIMP/$distro/$version/$arch"
fi
if [ "$distro" == RedHat ]; then
case $version in
'8' )
cat << EOF > /tmp/repo-include
repo --name="baseos" --baseurl="$uri_header/BaseOS" --noverifyssl
repo --name="appstream" --baseurl="$uri_header/AppStream" --noverifyssl
repo --name="epel" --baseurl="$local_header/epel" --noverifyssl
repo --name="epel-modular" --baseurl="$local_header/epel-modular" --noverifyssl
repo --name="powertools" --baseurl="$local_header/PowerTools" --noverifyssl
repo --name="postgresql" --baseurl="$local_header/postgresql" --noverifyssl
repo --name="puppet" --baseurl="$local_header/puppet" --noverifyssl
repo --name="simp" --baseurl="$local_header/SIMP" --noverifyssl
EOF
;;
'7' )
cat << EOF > /tmp/repo-include
repo --name="HighAvailability" --baseurl="$uri_header/addons/HighAvailability"
repo --name="ResilientStorage" --baseurl="$uri_header/addons/ResilientStorage"
repo --name="Base" --baseurl="$uri_header"
repo --name="simp" --baseurl="$local_header"
EOF
;;
esac
elif [ "$distro" == CentOS ]; then
case $version in
'8' )
cat << EOF > /tmp/repo-include
repo --name="baseos" --baseurl="$uri_header/BaseOS" --noverifyssl
repo --name="appstream" --baseurl="$uri_header/AppStream" --noverifyssl
repo --name="epel" --baseurl="$local_header/epel" --noverifyssl
repo --name="epel-modular" --baseurl="$local_header/epel-modular" --noverifyssl
repo --name="powertools" --baseurl="$local_header/PowerTools" --noverifyssl
repo --name="postgresql" --baseurl="$local_header/postgresql" --noverifyssl
repo --name="puppet" --baseurl="$local_header/puppet" --noverifyssl
repo --name="simp" --baseurl="$local_header/SIMP" --noverifyssl
EOF
;;
'7' )
cat << EOF > /tmp/repo-include
repo --name="Server" --baseurl="$uri_header"
repo --name="simp" --baseurl="$local_header"
repo --name="Updates" --baseurl="$uri_header/Updates" --noverifyssl
EOF
;;
esac
fi
|
<reponame>Yuze0101/xiang-ha-management
import request from '../utils/request';
type pageType = {
pageSize?: string;
currentPage?: string;
};
type searchType = {
pageSize?: string;
currentPage?: string;
val?: string;
};
type idType = {
_id: string;
};
enum NorY {
Y = 'Y',
N = 'N',
}
type updateType = {
_id: string;
isFree: NorY;
isHot: NorY;
name: string;
needTime: string;
};
export const getAllMenu = (data?: pageType) => {
console.log(data);
return request.post('/admin/findAllMenu', { data });
};
export const searchMenu = (data?: searchType) => {
return request.post('/admin/searchMenu', { data });
};
export const menuDetail = (data: idType) => {
return request.post('/admin/menuDetail', { data });
};
export const updateMenu = (data: updateType) => {
return request.post('/admin/updateMenu', { data });
};
|
namespace App\Controllers;
use App\Core\Http\Request;
use App\Core\Http\Response;
class DerivedController extends Controller
{
/**
* Handle the incoming request and return a response
*
* @param Request $request
* @return Response
*/
public function handleRequest(Request $request): Response
{
// Your implementation for handling the request and generating a response goes here
}
} |
def calculate_total_spent(receipt_collection):
total_spent = 0
for receipt in receipt_collection:
for item in receipt["items"]:
total_spent += item["price"]
return total_spent |
class Brawler:
def __init__(self, id, name):
self.id = id
self.name = name
def serialize(self):
serialized_id = self._writeVInt(self.id)
serialized_name_length = self._writeVInt(len(self.name))
serialized_name = self.name.encode('utf-8')
return serialized_id + serialized_name_length + serialized_name
@staticmethod
def deserialize(serialized_data):
id, remaining_data = Brawler._readVInt(serialized_data)
name_length, remaining_data = Brawler._readVInt(remaining_data)
name = remaining_data[:name_length].decode('utf-8')
return Brawler(id, name), remaining_data[name_length:]
@staticmethod
def _writeVInt(value):
result = b''
while True:
bits = value & 0x7F
value >>= 7
if value != 0:
bits |= 0x80
result += bytes([bits])
if value == 0:
break
return result
@staticmethod
def _readVInt(data):
value = 0
shift = 0
for byte in data:
value |= (byte & 0x7F) << shift
shift += 7
if not byte & 0x80:
break
return value, data[shift // 7:] |
package protoevents_test
import (
"context"
"log"
"net"
"testing"
"github.com/golang/mock/gomock"
"github.com/srikrsna/protoevents"
expb "github.com/srikrsna/protoevents/example"
"github.com/srikrsna/protoevents/mocks"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
)
func TestInterceptor(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
disp := mocks.NewMockDispatcher(ctrl)
disp.EXPECT().Dispatch(gomock.Any(), gomock.Any()).Times(1)
el := mocks.NewMockErrorLogger(ctrl)
el.EXPECT().Log(gomock.Any(), gomock.Any(), gomock.Any()).Times(0)
i := protoevents.NewInterceptor(protoevents.Options{
Dispatcher: disp,
ErrorLogger: el,
Preprocess: true,
})
lis := bufconn.Listen(1024 * 1024)
s := grpc.NewServer(grpc.ChainUnaryInterceptor(i))
expb.RegisterExampleServiceServer(s, exampleService{})
go func() {
if err := s.Serve(lis); err != nil {
log.Fatal(err)
}
}()
bd := func(context.Context, string) (net.Conn, error) {
return lis.Dial()
}
ctx := context.Background()
conn, err := grpc.DialContext(ctx, "bufnet", grpc.WithContextDialer(bd), grpc.WithInsecure())
if err != nil {
t.Fatalf("Failed to dial bufnet: %v", err)
}
defer conn.Close()
client := expb.NewExampleServiceClient(conn)
client.ExampleFiringRpc(ctx, &expb.ExampleRpcRequest{})
client.ExampleSilentRpc(ctx, &expb.ExampleRpcRequest{})
}
type exampleService struct {
expb.UnimplementedExampleServiceServer
}
func (exampleService) ExampleFiringRpc(context.Context, *expb.ExampleRpcRequest) (*expb.ExampleRpcResponse, error) {
return &expb.ExampleRpcResponse{}, nil
}
func (exampleService) ExampleSilentRpc(context.Context, *expb.ExampleRpcRequest) (*expb.ExampleRpcResponse, error) {
return &expb.ExampleRpcResponse{}, nil
}
|
public static String generateRandomString(int length) {
String result = "";
Random r = new Random();
for (int i = 0; i < length; i++) {
int randomNumber = r.nextInt(26) + 97;
char c = (char) randomNumber;
result = result + c;
}
return result;
} |
package com.professorvennie.bronzeage.core.network;
import com.professorvennie.bronzeage.api.tiles.ISideConfigurable;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import io.netty.buffer.ByteBuf;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Created by ProfessorVennie on 1/9/2015 at 11:12 AM.
*/
public class MessageConfigUpdate extends MessageCoords implements IMessage {
private ForgeDirection direction;
private boolean isTanks;
public MessageConfigUpdate() {
}
public MessageConfigUpdate(int x, int y, int z, ForgeDirection direction, boolean isTanks) {
super(x, y, z);
this.direction = direction;
this.isTanks = isTanks;
}
@Override
public void fromBytes(ByteBuf buf) {
super.fromBytes(buf);
direction = ForgeDirection.getOrientation(buf.readInt());
isTanks = buf.readBoolean();
}
@Override
public void toBytes(ByteBuf buf) {
super.toBytes(buf);
buf.writeInt(direction.ordinal());
buf.writeBoolean(isTanks);
}
public static class Handler implements IMessageHandler<MessageConfigUpdate, IMessage> {
@Override
public IMessage onMessage(MessageConfigUpdate message, MessageContext ctx) {
if (ctx.getServerHandler().playerEntity.worldObj.getTileEntity(message.x, message.y, message.z) instanceof ISideConfigurable) {
((ISideConfigurable) ctx.getServerHandler().playerEntity.worldObj.getTileEntity(message.x, message.y, message.z)).changeMode(message.direction);
if (message.isTanks)
((ISideConfigurable) ctx.getServerHandler().playerEntity.worldObj.getTileEntity(message.x, message.y, message.z)).changeTankMode(message.direction);
}
return null;
}
}
} |
<reponame>Pharma-Go/back-end
import { Body, Controller, Get, Post } from '@nestjs/common';
import { ApiOAuth2, ApiTags } from '@nestjs/swagger';
import { OAuthActionsScope } from 'src/lib/decorators/oauth.decorator';
import { SanitizePipe } from 'src/lib/pipes/sanitize.pipe';
import { CouponService } from './coupon.service';
import { CouponDto } from './dto/coupon.dto';
@ApiTags('Coupons')
@Controller('coupons')
@ApiOAuth2(['public'])
@OAuthActionsScope({
'Create-Many': ['admin'],
'Create-One': ['admin'],
'Update-One': ['admin'],
'Delete-All': ['admin'],
'Delete-One': ['admin'],
'Read-All': ['admin', 'employee', 'default'],
'Read-One': ['admin', 'employee', 'default'],
'Replace-One': ['admin'],
})
export class CouponController {
constructor(private couponService: CouponService) {}
@Get()
public getCoupons() {
return this.couponService.getAll();
}
@Post()
public createCoupon(@Body(new SanitizePipe(CouponDto)) dto: CouponDto) {
return this.couponService.create(dto);
}
}
|
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
. "$DIR"/../../integration-common/util/tc-messages.sh
set -euxo pipefail
suite_started SETUP
"$DIR"/vagrant-up.sh
cleanup() {
suite_finished SETUP
}
trap cleanup 0
test_with_command "REINSTALL_FRAMEWORK" \
vagrant ssh -c \"sudo /test/general/REINSTALL_FRAMEWORK.sh\"
|
export interface BattleSnakeInfo {
apiversion: string;
author: string;
color: string,
head: string,
tail: string,
} |
package proptics.specs
import cats.Eq
import cats.laws.discipline.{ExhaustiveCheck, FunctorTests, MiniInt, ProfunctorTests}
import org.scalacheck.Arbitrary._
import org.scalacheck.Cogen._
import org.scalacheck.ScalacheckShapeless._
import proptics.internal.Exchange
class ExchangeSpec extends PropticsSuite {
implicit def eqExchange0(implicit ev: ExhaustiveCheck[MiniInt]): Eq[Exchange[Int, Int, Int, Int]] = Eq.instance[Exchange[Int, Int, Int, Int]] { (ex1, ex2) =>
ev.allValues.forall { miniInt =>
val int = miniInt.toInt
ex1.view(int) === ex2.view(int) && ex1.review(int) === ex2.review(int)
}
}
checkAll("Functor Exchange[Int, Int, Int, Int]", FunctorTests[Exchange[Int, Int, Int, *]].functor[Int, Int, Int])
checkAll("Profunctor Exchange[Int, Int, Int, Int]", ProfunctorTests[Exchange[Int, Int, *, *]].profunctor[Int, Int, Int, Int, Int, Int])
}
|
class Vector3:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
def __str__(self):
return "x = {}, y = {}, z = {}".format(self.x, self.y, self.z)
def __add__(self, vector):
x = self.x + vector.x
y = self.y + vector.y
z = self.z + vector.z
return Vector3(x, y, z) |
package test;
/**
* @Class: TestOfCondition
* @Description: java类作用描述
* @Author: hubohua
* @CreateDate: 2018/8/17
*/
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* 测试Condition的用法
* 显示锁提供自己的等待/通知机制,即condition,与object的wait、notify、notifyAll对应
*
* ReetrantLock能够提供不止一个Condition,即一个锁支持多个Condition,
* 存在多个等待队列
*
* @see BlockQueue
*/
public class TestOfCondition {
private Lock lock = new ReentrantLock(); // 创建显示锁
private Condition condition = lock.newCondition(); // 得到新的condition对象
private volatile int conditions = 0; // thread execute condition
public static void main(String[] args) {
// new TestOfCondition().testOfCondition();
new TestOfCondition().testOfMultiCondition();
}
// lockCondition的await()、signal()方法分别对应
// 之前的Object的wait()和notify()方法。整体上
// 和Object的等待通知是类似的。
private void testOfCondition() {
Thread thread = new Thread() {
@Override
public void run() {
lock.lock();
try {
while (!(conditions == 1)) {
System.out.println("线程 " + Thread.currentThread().getName() + " 等待");
condition.await();
}
} catch (InterruptedException e) {
// 如果当前线程正在condition上await,则中断发生时,其await会被终止,并且interrupt状态会被清理。
System.out.println("线程 " + Thread.currentThread().getName() + " 被中断");
Thread.currentThread().interrupt();
} finally {
lock.unlock();
}
System.out.println("a executed by condition");
}
};
thread.start();
// current thread execute
lock.lock(); // 获取锁或者等待
try {
Thread.sleep(2000l);
conditions = 1;
condition.signal(); // 释放锁
} catch (InterruptedException e) {
System.out.println("线程 " + Thread.currentThread().getName() + " 被中断");
} finally {
lock.unlock();
}
System.out.println("condition already to 1.");
}
private void testOfMultiCondition() {
final BlockQueue<Integer> queue = new BlockQueue<>(3);
Thread addThread = new Thread(new Runnable() {
@Override
public void run() {
for (;;) {
try {
Thread.sleep(2000l);
int value = (int) (Math.random() * 100);
queue.add(value);
System.out.println("add thread add: " + value);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
});
Thread removeThread = new Thread(new Runnable() {
@Override
public void run() {
for (;;) {
try {
Thread.sleep(2000l);
int value = queue.remove();
System.out.println("remove thread remove: " + value);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
});
addThread.start();
removeThread.start();
}
}
|
<filename>server.js
'use strict';
const path = require('path'),
express = require('express'),
app = express(),
bodyParser = require('body-parser'),
mongoose = require('mongoose'),
http = require('http').Server(app),
io = require('socket.io')(http);
//require models....
// Connect to MongoDB
var db = mongoose.connect('mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/socket-io-chat', function(err) {
if (err) {
console.log('Could not connect to MongoDB!');
}
});
// Request body parsing middleware should be above methodOverride
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
//require routes...
http.listen(9000, function () {
console.log(' The app is up on port: ', 9000);
});
// Mounting the API to the current version (path)
app.get('/', function (req, res) {
res.sendFile( path.resolve('client/views/index.html') );
});
app.use('/js', express.static( path.resolve('client/js') ));
app.use('/css', express.static( path.resolve('client/css') ));
app.use('/components', express.static( path.resolve('bower_components') ));
app.use('/views', express.static( path.resolve('client/views') ));
var LocalStorage = require('node-localstorage').LocalStorage;
var localStorage = new LocalStorage('./scratch');
//io config
io.on('connect', function (socket) {
console.log('a user has connected');
socket.on('disconnect', function (data) {
console.log('a user has disconnected');
});
socket.on('message', function(data){
localStorage.setItem('socketMessages', JSON.stringify(data));pladfp[lasd]
// socketMessagesObj.push(data.message);
// localStorage.getItem('socketMessages').push(data.message);
socket.emit('message', JSON.parse(localStorage.getItem('socketMessages')) || '{}');
});
// var i = 0;
// setInterval(function(){
// if(i % 5 === 0){
// socket.emit('message', {
// number: i
// });
// }
// i++;
// }, 1000)
});
|
#!/bin/bash
pos_root_dir="/home/psd/"
pos_working_dir="${pos_root_dir}ibofos"
pos_conf="/etc/pos"
target_ip=127.0.0.1
target_type="VM"
trtype="tcp"
port=1158
test_rev=0
master_bin_path="/mnt/rsa_nfs/pos-bin"
pos_bin_filename="poseidonos"
build_optimization="ON"
job_number=12
wt_enable=0
printVariable()
{
if [ $test_rev == 0 ]
then
print_help
exit 1
fi
master_bin_path+=/${test_rev}
echo "*****************************************************************"
echo "***** Script Info - Build Setup for CI *****"
echo "***** Must Main Variables Be Given *****"
echo "*****************************************************************"
echo "Target IP : $target_ip"
echo "Transport Type : $trtype"
echo "Port Number : $port"
echo "PoseidonOS Root : $pos_working_dir"
echo "Target Type : $target_type"
echo "Config Option : $config_option"
echo "Test Revision : $test_rev"
echo "Master Bin Path: ${master_bin_path}"
echo "*****************************************************************"
echo "*****************************************************************"
}
processKill()
{
echo "Killing previously-running poseidonos..."
$pos_working_dir/test/script/kill_poseidonos.sh
}
repositorySetup()
{
cd ${pos_working_dir}
echo "Setting git repository..."
git fetch -p
git clean -dff
rm -rf *
git reset --hard $test_rev
echo "Setting git repository done"
}
setJobNumber()
{
if [ $target_type == "PM" ] || [ $target_type == "PSD" ]
then
job_number=16
elif [ $target_type == "VM" ]
then
job_number=12
else
echo "## ERROR: incorrect target type(VM/PM/PSD)"
exit 1
fi
}
buildLib()
{
echo "Build lib For $target_type"
make CACHE=Y -j ${job_number} -C lib
}
buildPos()
{
echo "Build For $target_type"
make CACHE=Y -j ${job_number}
}
getPos()
{
echo "## START TO COPY BIN FILES INTO VM|PSD : from ${master_bin_path} to ${pos_working_dir}/bin ##"
if [ ! -d ${pos_working_dir}/bin ]
then
echo "## mkdir ${pos_working_dir}/bin"
mkdir ${pos_working_dir}/bin
else
echo "## rm old ${pos_working_dir}/bin files"
rm ${pos_working_dir}/bin/*
fi
cp ${master_bin_path}/* ${pos_working_dir}/bin
}
backupPos()
{
echo "## START TO COPY BIN FILES INTO MASTER : from ${pos_working_dir}/bin to ${master_bin_path} ##"
cp ${pos_working_dir}/bin/* ${master_bin_path}/
if [ -f ${master_bin_path}/${pos_bin_filename} ]
then
echo "#### COMPLETE TO COPY BINARY INTO MASTER ${master_bin_path}/${pos_bin_filename} "
else
echo "## ERROR: NO COPIED BINARY ${master_bin_path}/${pos_bin_filename} "
exit 1
fi
}
buildTest()
{
if [ $build_optimization == "OFF" ]
then
sed -i 's/O2/O0/g' $pos_working_dir/Makefile
fi
$pos_working_dir/script/pkgdep.sh
rm -rf /dev/shm/*
rm $pos_working_dir/bin/poseidonos
./configure $config_option
cwd=""
cd ${pos_working_dir}/lib; sudo cmake . -DSPDK_DEBUG_ENABLE=n -DUSE_LOCAL_REPO=y
make -j ${job_number} clean
if [ $target_type == "VM" ]
then
echo "copy air.cfg"
cp -f ${pos_working_dir}/config/air_ci.cfg ${pos_working_dir}/config/air.cfg
fi
if [ ! -d ${master_bin_path} ]
then
echo "## mkdir ${master_bin_path}"
sudo mkdir ${master_bin_path}
fi
cd ${pos_working_dir}
buildLib
if [ $build_optimization == "OFF" ]
then
buildPos
else
echo "#### CHECK BINARY IN MASTER : ${master_bin_path}/${pos_bin_filename} ####"
if [ -f ${master_bin_path}/${pos_bin_filename} ]
then
getPos
else
buildPos
fi
fi
if [ ! -f ${pos_working_dir}/bin/${pos_bin_filename} ]
then
echo "## ERROR: NO BUILT BINARY ${pos_working_dir}/bin/${pos_bin_filename} "
exit 1
fi
if [ $target_type == "VM" ] || [ $target_type == "PSD" ] && [ $build_optimization == "ON" ]
then
backupPos
fi
rm $pos_conf/pos.conf
make install
make udev_install
if [ -f $pos_working_dir/bin/poseidonos ]
then
echo "Build Success"
else
echo "Build Failed"
exit 1
fi
}
setupTest()
{
echo 1 > /proc/sys/vm/drop_caches
./script/setup_env.sh
if [ $wt_enable -eq 1 ]
then
cp $pos_working_dir/config/ibofos_for_psd_ci_wt.conf $pos_conf/pos.conf
else
cp $pos_working_dir/config/ibofos_for_psd_ci.conf $pos_conf/pos.conf
fi
rmmod nvme_tcp
rmmod nvme_rdma
rmmod nvme_fabrics
modprobe nvme_tcp
modprobe nvme_rdma
}
print_help()
{
echo "Script Must Be Called with Revision Number"
real_ip=$(ip -o addr show up primary scope global |
while read -r num dev fam addr rest; do echo ${addr%/*}; done)
cmp_ip=${real_ip:0:3}
echo "real IP:${real_ip}, compare:${cmp_ip}"
if [ ${cmp_ip} == "165" ]
then
echo "./build_setup_165.sh -i [target_ip=127.0.0.1] -t [target_type=VM] -r [test_revision] -c [config_option] -d [working directory]"
else
echo "./build_setup.sh -i [target_ip=127.0.0.1] -t [target_type=VM] -r [test_revision] -c [config_option] -d [working directory]"
fi
}
while getopts "i:h:t:c:r:d:o:w" opt
do
case "$opt" in
h) print_help
;;
i) target_ip="$OPTARG"
;;
t) target_type="$OPTARG"
;;
c) config_option="$OPTARG"
;;
r) test_rev="$OPTARG"
;;
d) pos_root_dir="$OPTARG"
pos_working_dir="${pos_root_dir}/ibofos"
;;
o) build_optimization="$OPTARG"
;;
w) wt_enable=1
;;
?) exit 2
;;
esac
done
printVariable
processKill
repositorySetup
setJobNumber
buildTest
setupTest
echo "Build And Setup Success"
|
kubectl apply -f docker/kubernetes/services/cloudsql-proxy.yaml
kubectl apply -f docker/kubernetes/services/rails-nginx.yaml
|
package io.cattle.platform.process.lock;
import io.cattle.platform.core.model.Network;
import io.cattle.platform.lock.definition.AbstractBlockingLockDefintion;
public class DefaultNetworkLock extends AbstractBlockingLockDefintion {
public DefaultNetworkLock(Network network) {
super("DEFAULT.NETWORK." + network.getClusterId());
}
}
|
<filename>lib/printf7.h
#ifndef H_DISPLAY
#define H_DISPLAY
#include <stdint.h>
#include "tm1637.h"
// schematic depended (not necessarily segment A fits byte 0)
#define SEGA (1 << 0)
#define SEGB (1 << 2)
#define SEGC (1 << 4)
#define SEGD (1 << 6)
#define SEGE (1 << 7)
#define SEGF (1 << 1)
#define SEGG (1 << 3)
#define SEGDP (1 << 5)
#define DIGITS DISPLAY_SIZE
void myprintf(char *format, ... );
#endif
|
function updateParticipants(names, progress) {
const initialParticipants = [];
for (let i = 1; i <= progress.length; i++) {
initialParticipants.push({
name: names && names?.length >= i ? names[i - 1] : '',
progress: progress[i - 1],
missCount: 0
});
}
return initialParticipants;
} |
<gh_stars>100-1000
//onShow = open
//cancelCallback = cancel
//doneCallback = done
//removed id property
// added this.popup = $el;
(function($){
"use strict";
var queue=[];
$.widget("afui.popup",{
options:{
addCssClass: "",
title: "Alert",
message: "",
cancelText: "Cancel",
cancel: null,
cancelClass: "",
doneText: "",
done:null,
doneClass: "",
cancelOnly: false,
open:null,
autoCloseDone: true,
suppressTitle: false
},
_create:function(){
},
_init:function(){
queue.push(this);
if (queue.length === 1)
this.show();
},
widget:function(){
return this.popup;
},
show: function () {
var markup = "<div class='afPopup hidden "+ this.options.addCssClass + "'>"+
"<header>" + this.options.title + "</header>"+
"<div>" + this.options.message + "</div>"+
"<footer>"+
"<a href='javascript:;' class='" + this.options.cancelClass + "' id='cancel'>" + this.options.cancelText + "</a>"+
"<a href='javascript:;' class='" + this.options.doneClass + "' id='action'>" + this.options.doneText + "</a>"+
"<div style='clear:both'></div>"+
"</footer>"+
"</div>";
var $el=$(markup);
this.element.append($el);
this.popup=$el;
this._on($el,{close:"hide"});
if (this.options.cancelOnly) {
$el.find("A#action").hide();
$el.find("A#cancel").addClass("center");
}
//@TODO Change to event
this._on($el,{"click a":function(event){
var button = $(event.target);
console.log(button);
if (button.attr("id") === "cancel") {
this._trigger("cancel",event);
//this.options.cancelCallback.call(this.options.cancelCallback, this);
this.hide();
} else {
this._trigger("done",event);
//this.options.doneCallback.call(this.options.doneCallback, this);
if (this.options.autoCloseDone)
this.hide();
}
event.preventDefault();
}});
this.positionPopup();
$.blockUI(0.5);
this._on({orientationchange:"positionPopup"});
//force header/footer showing to fix CSS style bugs
this.popup.find("header,footer").show();
this._delay(function(){
this.popup.removeClass("hidden").addClass("show");
//this.options.onShow(this);
this._trigger("open");
},50);
},
hide: function () {
this.popup.addClass("hidden");
$.unblockUI();
if(1==1){//!$.os.ie&&!$.os.android){
this._delay("remove",250);
}
else
this.remove();
},
remove: function () {
this._off(this.element,"orientationchange");
this.popup.remove();
queue.splice(0, 1);
if (queue.length > 0)
queue[0].show();
},
positionPopup: function () {
this.popup.css({
"top":((window.innerHeight / 2.5) + window.pageYOffset) - (this.popup[0].clientHeight / 2),
"left":(window.innerWidth / 2) - (this.popup[0].clientWidth / 2)
});
}
});
var uiBlocked = false;
$.blockUI = function (opacity) {
if (uiBlocked)
return;
opacity = opacity ? " style='opacity:" + opacity + ";'" : "";
$("BODY").prepend($("<div id='mask'" + opacity + "></div>"));
$("BODY DIV#mask").bind("touchstart", function (e) {
e.preventDefault();
});
$("BODY DIV#mask").bind("touchmove", function (e) {
e.preventDefault();
});
uiBlocked = true;
};
$.unblockUI = function () {
uiBlocked = false;
$("BODY DIV#mask").unbind("touchstart");
$("BODY DIV#mask").unbind("touchmove");
$("BODY DIV#mask").remove();
};
$.afui.registerDataDirective("[data-alert]",function(item){
var $item=$(item);
var message=$item.attr("data-message");
if(message.length===0) return;
$(document.body).popup({message:message,cancelOnly:true});
});
$.afui.popup=function(opts){
return $(document.body).popup(opts);
};
})(jQuery);
|
import React from 'react';
const Restaurant = () => {
const restaurant = {
name: 'Diner',
address: '123 Main Street',
menu: [
{name: 'Burger', price: 8},
{name: 'Fries', price: 3},
{name: 'Salad', price: 6},
],
reviews: [
{name: 'John', rating: 4},
{name: 'Jane', rating: 5},
{name: 'Jacob', rating: 3},
]
};
return (
<div>
<h1>{restaurant.name}</h1>
<p>{restaurant.address}</p>
<h2>Menu</h2>
<ul>
{ restaurant.menu.map((item, index) => (
<li key={index}>
{item.name} (${item.price})
</li>
)) }
</ul>
<h2>Reviews</h2>
<ul>
{ restaurant.reviews.map((review, index) => (
<li key={index}>
{review.name}
<span role="img" aria-label="star">⭐</span>
{review.rating}
</li>
)) }
</ul>
</div>
);
};
export default Restaurant; |
lpr \
-P EPSON-EP-804A \
-o MediaType=${MEDIA_TYPE} \
-o PrintQuality=Normal \
-o PageSize=100x148mm \
-o PageRegion=A4 \
-o InputSlot=UpperTray \
-o Color=Grayscale \
-o Borderless=Off \
-o OutputPaper=100x148mm \
-o ReduceEnlarge=Off \
-o ScaleRatio=0 \
-o PosterPrinting=Off \
-o Duplex=None \
-o AdjustPrintDensity=Text \
-o Rotate180=Off \
-o MirrorImage=Off \
-o CDDVDInnerPrintPosition=43mm \
-o CDDVDPrintPosUpDown=0.0mm \
-o CDDVDPrintPosLeftRight=0.0mm \
-o Watermark=None \
-o ColurWatermark=Red \
-o PositionWatermark=Center \
-o DensityWatermark=Level4 \
-o SizeWatermark=70 \
-o CorrectionColor=AdobeRGB \
-o GammaValue=2.2 \
-o BrightnessValue=0 \
-o ContrastValue=0 \
-o SaturationValue=0 \
-o CyanValue=0 \
-o MagentaValue=0 \
-o YellowValue=0 \
${FILE_PATH}
|
<filename>src/ua/nure/fiedietsov/payments/PreparePay.java
/**
* @author <NAME>.
* @version 1.0
*/
package ua.nure.fiedietsov.payments;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import ua.nure.fiedietsov.DAO.DBManager;
/**
* Servlet helps to add transaction into cart.
* @author <NAME>.
* @version 1.0
*/
@WebServlet("/pays/prepay")
public class PreparePay extends HttpServlet {
private static final long serialVersionUID = 1L;
private static final Logger LOGGER = Logger.getLogger(PreparePay.class);
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
LOGGER.debug("/pays/prepay#dopost started");
boolean status = (boolean) request.getSession().getAttribute("customerStatus");
if(status != true){
String userEmail = request.getUserPrincipal().getName();
String account = request.getParameter("selectAcc1");
String toPay = request.getParameter("toPay");
String toPayInfo = request.getParameter("toPayInfo");
Double money = Double.parseDouble(request.getParameter("money"));
int res = 0;
Connection con = DBManager.getDBCon();
try {
res = DBManager.addPayment(con, account, userEmail, toPay, toPayInfo, money);
LOGGER.warn("prepared payments was addinf into cart.");
} catch (SQLException e) {
LOGGER.error("Cannot execute querry", e);
}
request.getSession().setAttribute("resultOp", res);
response.sendRedirect("./payments.jsp");
}else response.sendRedirect("./mypays.jsp");
}
}
|
import { axiosWithAuth } from '../../utils/axiosWithAuth';
// PROGRAM ACTION TYPES
export const GET_ALL_PROGRAM_START = 'GET_ALL_PROGRAM_START';
export const GET_ALL_PROGRAM_SUCCESS = 'GET_ALL_PROGRAM_SUCCESS';
export const GET_ALL_PROGRAM_FAIL = 'GET_ALL_PROGRAM_FAIL';
export const GET_ALL_PROGRAM_RESOLVE = 'GET_ALL_PROGRAM_RESOLVE';
export const GET_PROGRAM_START = 'GET_PROGRAM_START';
export const GET_PROGRAM_SUCCESS = 'GET_PROGRAM_SUCCESS';
export const GET_PROGRAM_FAIL = 'GET_PROGRAM_FAIL';
export const GET_PROGRAM_RESOLVE = 'GET_PROGRAM_RESOLVE';
export const ADD_PROGRAM_START = 'ADD_PROGRAM_START';
export const ADD_PROGRAM_SUCCESS = 'ADD_PROGRAM_SUCCESS';
export const ADD_PROGRAM_FAIL = 'ADD_PROGRAM_FAIL';
export const ADD_PROGRAM_RESOLVE = 'ADD_PROGRAM_RESOLVE';
export const EDIT_PROGRAM_START = 'EDIT_PROGRAM_START';
export const EDIT_PROGRAM_SUCCESS = 'EDIT_PROGRAM_SUCCESS';
export const EDIT_PROGRAM_FAIL = 'EDIT_PROGRAM_FAIL';
export const EDIT_PROGRAM_RESOLVE = 'EDIT_PROGRAM_RESOLVE';
export const DELETE_PROGRAM_START = 'DELETE_PROGRAM_START';
export const DELETE_PROGRAM_SUCCESS = 'DELETE_PROGRAM_SUCCESS';
export const DELETE_PROGRAM_FAIL = 'DELETE_PROGRAM_FAIL';
export const DELETE_PROGRAM_RESOLVE = 'DELETE_PROGRAM_RESOLVE';
// PROGRAMS ACTIONS
export const getAllProgramsAction = () => dispatch => {
dispatch({ type: GET_ALL_PROGRAM_START });
axiosWithAuth()
.get(`/api/programs`)
.then(res => {
dispatch({ type: GET_ALL_PROGRAM_SUCCESS, payload: res.data });
})
.catch(err => {
dispatch({ type: GET_ALL_PROGRAM_FAIL, payload: err.message });
})
.finally(() => {
dispatch({ type: GET_ALL_PROGRAM_RESOLVE });
});
};
export const getProgramByIdAction = programId => dispatch => {
dispatch({ type: GET_PROGRAM_START });
axiosWithAuth()
.get(`/api/programs/${programId}`)
.then(res => {
dispatch({ type: GET_PROGRAM_SUCCESS, payload: res.data });
})
.catch(err => {
dispatch({ type: GET_PROGRAM_FAIL, payload: err.message });
})
.finally(() => {
dispatch({ type: GET_PROGRAM_RESOLVE });
});
};
export const addProgramAction = programObj => dispatch => {
dispatch({ type: ADD_PROGRAM_START });
axiosWithAuth()
.post(`/api/programs`, programObj)
.then(res => {
dispatch({ type: ADD_PROGRAM_SUCCESS, payload: res.data });
})
.catch(err => {
dispatch({ type: ADD_PROGRAM_FAIL, payload: err.message });
})
.finally(() => {
dispatch({ type: ADD_PROGRAM_RESOLVE });
});
};
export const editProgramAction = (programId, programObj) => dispatch => {
dispatch({ type: EDIT_PROGRAM_START });
axiosWithAuth()
.put(`/api/programs/${programId}`, programObj)
.then(res => {
dispatch({ type: EDIT_PROGRAM_SUCCESS, payload: res.data });
})
.catch(err => {
dispatch({ type: EDIT_PROGRAM_FAIL, payload: err.response.data });
})
.finally(() => {
dispatch({ type: EDIT_PROGRAM_RESOLVE });
});
};
export const deleteProgramAction = programId => dispatch => {
dispatch({ type: DELETE_PROGRAM_START });
axiosWithAuth()
.delete(`/api/programs/${programId}`)
.then(res => {
dispatch({ type: DELETE_PROGRAM_SUCCESS, payload: res.data });
})
.catch(err => {
dispatch({ type: DELETE_PROGRAM_FAIL, payload: err.message });
})
.finally(() => {
dispatch({ type: DELETE_PROGRAM_RESOLVE });
});
};
|
import {
Catch,
HttpException,
ExceptionFilter,
ArgumentsHost,
Logger,
} from '@nestjs/common';
import { Response, Request } from 'express';
@Catch(HttpException)
export class HttpExceptionFilter implements ExceptionFilter {
constructor(private readonly env: string) {}
catch(exception: HttpException, host: ArgumentsHost): void {
const ctx = host.switchToHttp();
const res = ctx.getResponse<Response>();
const { ip, url } = ctx.getRequest<Request>();
const status = exception.getStatus();
Logger.error({ ip, url, time: new Date() }, exception.stack);
const errorBody = {
trace: exception.stack.split('\n').map(trace => trace.trim()),
};
res.status(status).json(errorBody);
}
}
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var _propTypes = _interopRequireDefault(require("prop-types"));
var _stopMediaStream = _interopRequireDefault(require("stop-media-stream"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var UserMedia =
/*#__PURE__*/
function (_Component) {
_inherits(UserMedia, _Component);
function UserMedia() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, UserMedia);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(UserMedia)).call.apply(_getPrototypeOf2, [this].concat(args)));
_defineProperty(_assertThisInitialized(_this), "state", {
error: null,
stream: null
});
return _this;
}
_createClass(UserMedia, [{
key: "getUserMedia",
value: function getUserMedia() {
var _this2 = this;
navigator.mediaDevices.getUserMedia(this.props.constraints).then(function (stream) {
_this2.setState({
stream: stream
});
_this2.props.onMediaStream(stream);
}, function (error) {
_this2.setState({
error: error
});
_this2.props.onError(error);
});
}
}, {
key: "componentDidMount",
value: function componentDidMount() {
this.getUserMedia();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
if (this.props.constraints !== prevProps.constraints) {
(0, _stopMediaStream["default"])(this.state.stream);
this.getUserMedia();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
(0, _stopMediaStream["default"])(this.state.stream);
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
children = _this$props.children,
placeholder = _this$props.placeholder,
renderError = _this$props.renderError;
var _this$state = this.state,
error = _this$state.error,
stream = _this$state.stream;
if (stream) {
return children(stream);
}
if (error) {
return renderError(error);
}
return placeholder;
}
}]);
return UserMedia;
}(_react.Component);
exports["default"] = UserMedia;
_defineProperty(UserMedia, "propTypes", {
children: _propTypes["default"].func,
constraints: _propTypes["default"].object,
onError: _propTypes["default"].func,
onMediaStream: _propTypes["default"].func,
placeholder: _propTypes["default"].node,
renderError: _propTypes["default"].func
});
_defineProperty(UserMedia, "defaultProps", {
children: function children() {
return null;
},
constraints: {},
onError: function onError() {
return null;
},
onMediaStream: function onMediaStream() {
return null;
},
placeholder: null,
renderError: function renderError() {
return null;
}
}); |
#!/bin/bash
set -ex
# Build script for Travis-CI.
SCRIPTDIR=$(cd $(dirname "$0") && pwd)
ROOTDIR="$SCRIPTDIR/../.."
WHISKDIR="$ROOTDIR/../openwhisk"
export OPENWHISK_HOME=$WHISKDIR
cd ${ROOTDIR}
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
TERM=dumb ./gradlew :tests:test
else
TERM=dumb ./gradlew :tests:testWithoutCredentials
fi |
package Question18_7;
import java.util.Arrays;
import java.util.HashMap;
/**
* 给定一组单词,编写一个程序,找出其中的最长单词,并且该单词由这组单词中其他单词组合而成
*/
public class Question {
public static String printLongestWord(String arr[]) {
HashMap<String, Boolean> map = new HashMap<String, Boolean>();
for (String str : arr) {
map.put(str, true);
}
Arrays.sort(arr, new LengthComparator()); // Sort by length
for (String s : arr) {
if (canBuildWord(s, true, map)) {
System.out.println(s);
return s;
}
}
return "";
}
public static boolean canBuildWord(String str, boolean isOriginalWord, HashMap<String, Boolean> map) {
if (map.containsKey(str) && !isOriginalWord) {
return map.get(str);
}
for (int i = 1; i < str.length(); i++) {
String left = str.substring(0, i);
String right = str.substring(i);
if (map.containsKey(left) && map.get(left) == true &&
canBuildWord(right, false, map)) {
return true;
}
}
map.put(str, false);
return false;
}
public static void main(String[] args) {
String[] arr = createGiantArray();
printLongestWord(arr);
}
public static String[] createGiantArray() {
String arr[] = {"a",
"able",
"about",
"account",
"acid",
"across",
"act",
"addition",
"adjustment",
"advertisement",
"after",
"again",
"against",
"agreement",
"air",
"all",
"almost",
"among",
"amount",
"amusement",
"and",
"angle",
"angry",
"animal",
"answer",
"ant",
"any",
"apparatus",
"apple",
"approval",
"arch",
"argument",
"arm",
"army",
"art",
"as",
"at",
"attack",
"attempt",
"attention",
"attraction",
"authority",
"automatic",
"awake",
"baby",
"back",
"bad",
"bag",
"balance",
"ball",
"band",
"base",
"basin",
"basket",
"bath",
"be",
"beautiful",
"because",
"bed",
"bee",
"before",
"behaviour",
"belief",
"bell",
"bent",
"berry",
"between",
"bird",
"birth",
"bit",
"bite",
"bitter",
"black",
"blade",
"blood",
"blow",
"blue",
"board",
"boat",
"body",
"boiling",
"bone",
"book",
"boot",
"bottle",
"box",
"boy",
"brain",
"brake",
"branch",
"brass",
"bread",
"breath",
"brick",
"bridge",
"bright",
"broken",
"brother",
"brown",
"brush",
"bucket",
"building",
"bulb",
"burn",
"burst",
"business",
"but",
"butter",
"button",
"by",
"cake",
"camera",
"canvas",
"card",
"care",
"carriage",
"cart",
"cat",
"cause",
"certain",
"chain",
"chalk",
"chance",
"change",
"cheap",
"cheese",
"chemical",
"chest",
"chief",
"chin",
"church",
"circle",
"clean",
"clear",
"clock",
"cloth",
"cloud",
"coal",
"coat",
"cold",
"collar",
"colour",
"comb",
"come",
"comfort",
"committee",
"common",
"company",
"comparison",
"competition",
"complete",
"complex",
"condition",
"connection",
"conscious",
"control",
"cook",
"copper",
"copy",
"cord",
"cork",
"cotton",
"cough",
"country",
"cover",
"cow",
"crack",
"credit",
"crime",
"cruel",
"crush",
"cry",
"cup",
"cup",
"current",
"curtain",
"curve",
"cushion",
"damage",
"danger",
"dark",
"daughter",
"day",
"dead",
"dear",
"death",
"debt",
"decision",
"deep",
"degree",
"delicate",
"dependent",
"design",
"desire",
"destruction",
"detail",
"development",
"different",
"digestion",
"direction",
"dirty",
"discovery",
"discussion",
"disease",
"disgust",
"distance",
"distribution",
"division",
"do",
"dog",
"door",
"doubt",
"down",
"drain",
"drawer",
"dress",
"drink",
"driving",
"drop",
"dry",
"dust",
"ear",
"early",
"earth",
"east",
"edge",
"education",
"effect",
"egg",
"elastic",
"electric",
"end",
"engine",
"enough",
"equal",
"error",
"even",
"event",
"ever",
"every",
"example",
"exchange",
"existence",
"expansion",
"experience",
"expert",
"eye",
"face",
"fact",
"fall",
"FALSE",
"family",
"far",
"farm",
"fat",
"father",
"fear",
"feather",
"feeble",
"feeling",
"female",
"fertile",
"fiction",
"field",
"fight",
"finger",
"fire",
"first",
"fish",
"fixed",
"flag",
"flame",
"flat",
"flight",
"floor",
"flower",
"fly",
"fold",
"food",
"foolish",
"foot",
"for",
"force",
"fork",
"form",
"forward",
"fowl",
"frame",
"free",
"frequent",
"friend",
"from",
"front",
"fruit",
"full",
"future",
"garden",
"general",
"get",
"girl",
"give",
"glass",
"glove",
"go",
"goat",
"gold",
"good",
"government",
"grain",
"grass",
"great",
"green",
"grey",
"grip",
"group",
"growth",
"guide",
"gun",
"hair",
"hammer",
"hand",
"hanging",
"happy",
"harbour",
"hard",
"harmony",
"hat",
"hate",
"have",
"he",
"head",
"healthy",
"hear",
"hearing",
"heart",
"heat",
"help",
"high",
"history",
"hole",
"hollow",
"hook",
"hope",
"horn",
"horse",
"hospital",
"hour",
"house",
"how",
"humour",
"I",
"ice",
"idea",
"if",
"ill",
"important",
"impulse",
"in",
"increase",
"industry",
"ink",
"insect",
"instrument",
"insurance",
"interest",
"invention",
"iron",
"island",
"jelly",
"jewel",
"join",
"journey",
"judge",
"jump",
"keep",
"kettle",
"key",
"kick",
"kind",
"kiss",
"knee",
"knife",
"knot",
"knowledge",
"land",
"language",
"last",
"late",
"laugh",
"law",
"lead",
"leaf",
"learning",
"leather",
"left",
"leg",
"let",
"letter",
"level",
"library",
"lift",
"light",
"like",
"limit",
"line",
"linen",
"lip",
"liquid",
"list",
"little",
"living",
"lock",
"long",
"look",
"loose",
"loss",
"loud",
"love",
"low",
"machine",
"make",
"male",
"man",
"manager",
"map",
"mark",
"market",
"married",
"mass",
"match",
"material",
"may",
"meal",
"measure",
"meat",
"medical",
"meeting",
"memory",
"metal",
"middle",
"military",
"milk",
"mind",
"mine",
"minute",
"mist",
"mixed",
"money",
"monkey",
"month",
"moon",
"morning",
"mother",
"motion",
"mountain",
"mouth",
"move",
"much",
"muscle",
"music",
"nail",
"name",
"narrow",
"nation",
"natural",
"near",
"necessary",
"neck",
"need",
"needle",
"nerve",
"net",
"new",
"news",
"night",
"no",
"noise",
"normal",
"north",
"nose",
"not",
"note",
"now",
"number",
"nut",
"observation",
"of",
"off",
"offer",
"office",
"oil",
"old",
"on",
"only",
"open",
"operation",
"opinion",
"opposite",
"or",
"orange",
"order",
"organization",
"ornament",
"other",
"out",
"oven",
"over",
"owner",
"page",
"pain",
"paint",
"paper",
"parallel",
"parcel",
"part",
"past",
"paste",
"payment",
"peace",
"pen",
"pencil",
"person",
"physical",
"picture",
"pig",
"pin",
"pipe",
"place",
"plane",
"plant",
"plate",
"play",
"please",
"pleasure",
"plough",
"pocket",
"point",
"poison",
"polish",
"political",
"poor",
"porter",
"position",
"possible",
"pot",
"potato",
"powder",
"power",
"present",
"price",
"print",
"prison",
"private",
"probable",
"process",
"produce",
"profit",
"property",
"prose",
"protest",
"public",
"pull",
"pump",
"punishment",
"purpose",
"push",
"put",
"quality",
"question",
"quick",
"quiet",
"quite",
"rail",
"rain",
"range",
"rat",
"rate",
"ray",
"reaction",
"reading",
"ready",
"reason",
"receipt",
"record",
"red",
"regret",
"regular",
"relation",
"religion",
"representative",
"request",
"respect",
"responsible",
"rest",
"reward",
"rhythm",
"rice",
"right",
"ring",
"river",
"road",
"rod",
"roll",
"roof",
"room",
"root",
"rough",
"round",
"rub",
"rule",
"run",
"sad",
"safe",
"sail",
"salt",
"same",
"sand",
"say",
"scale",
"school",
"science",
"scissors",
"screw",
"sea",
"seat",
"second",
"secret",
"secretary",
"see",
"seed",
"seem",
"selection",
"self",
"send",
"sense",
"separate",
"serious",
"servant",
"sex",
"shade",
"shake",
"shame",
"sharp",
"sheep",
"shelf",
"ship",
"shirt",
"shock",
"shoe",
"short",
"shut",
"side",
"sign",
"silk",
"silver",
"simple",
"sister",
"size",
"skin",
"skirt",
"sky",
"sleep",
"slip",
"slope",
"slow",
"small",
"smash",
"smell",
"smile",
"smoke",
"smooth",
"snake",
"sneeze",
"snow",
"so",
"soap",
"society",
"sock",
"soft",
"solid",
"some",
"",
"son",
"song",
"sort",
"sound",
"soup",
"south",
"space",
"spade",
"special",
"sponge",
"spoon",
"spring",
"square",
"stage",
"stamp",
"star",
"start",
"statement",
"station",
"steam",
"steel",
"stem",
"step",
"stick",
"sticky",
"stiff",
"still",
"stitch",
"stocking",
"stomach",
"stone",
"stop",
"store",
"story",
"straight",
"strange",
"street",
"stretch",
"strong",
"structure",
"substance",
"such",
"sudden",
"sugar",
"suggestion",
"summer",
"sun",
"support",
"surprise",
"sweet",
"swim",
"system",
"table",
"tail",
"take",
"talk",
"tall",
"taste",
"tax",
"teaching",
"tendency",
"test",
"than",
"that",
"the",
"then",
"theory",
"there",
"thick",
"thin",
"thing",
"this",
"thought",
"thread",
"throat",
"through",
"through",
"thumb",
"thunder",
"ticket",
"tight",
"till",
"time",
"tin",
"tired",
"to",
"toe",
"together",
"tomorrow",
"tongue",
"tooth",
"top",
"touch",
"town",
"trade",
"train",
"transport",
"tray",
"tree",
"trick",
"trouble",
"trousers",
"TRUE",
"turn",
"twist",
"umbrella",
"under",
"unit",
"up",
"use",
"value",
"verse",
"very",
"vessel",
"view",
"violent",
"voice",
"waiting",
"walk",
"wall",
"war",
"warm",
"wash",
"waste",
"watch",
"water",
"wave",
"wax",
"way",
"weather",
"week",
"weight",
"well",
"west",
"wet",
"wheel",
"when",
"where",
"while",
"whip",
"whistle",
"white",
"who",
"why",
"wide",
"will",
"wind",
"window",
"wine",
"wing",
"winter",
"wire",
"wise",
"with",
"woman",
"wood",
"wool",
"word",
"work",
"worm",
"wound",
"writing",
"wrong",
"year",
"yellow",
"yes",
"yesterday",
"you",
"young"};
return arr;
/* To see performance on a larger array, comment / delete the above "return arr;" line and uncomment the below code.
* This will create a giant array by concatenating words from the above list.*/
/*ArrayList<String> list = new ArrayList<String>();
for (int i = 0; i < arr.length; i++) {
int n = AssortedMethods.randomIntInRange(0, 1000);
String s = arr[i];
for (int j = 0; j < n; j++) {
int index = AssortedMethods.randomIntInRange(0, i);
s += arr[index];
}
list.add(s);
list.add(arr[i]);
}
String[] ar = new String[list.size()];
for (int i = 0; i < list.size(); i++) {
ar[i] = list.get(i);
}
return ar;
*/
}
}
|
/**
* @file 获取属性处理对象
* @author errorrik(<EMAIL>)
*/
var contains = require('../util/contains');
var empty = require('../util/empty');
var svgTags = require('../browser/svg-tags');
var isComponent = require('./is-component');
/**
* HTML 属性和 DOM 操作属性的对照表
*
* @inner
* @const
* @type {Object}
*/
var HTML_ATTR_PROP_MAP = {
'readonly': 'readOnly',
'cellpadding': 'cellPadding',
'cellspacing': 'cellSpacing',
'colspan': 'colSpan',
'rowspan': 'rowSpan',
'valign': 'vAlign',
'usemap': 'useMap',
'frameborder': 'frameBorder',
'for': 'htmlFor',
'class': 'className'
};
/**
* 默认的元素的属性设置的变换方法
*
* @inner
* @type {Object}
*/
var defaultElementPropHandler = {
input: {
attr: function (element, name, value) {
if (value) {
return ' ' + name + '="' + value + '"';
}
},
prop: function (element, name, value) {
name = HTML_ATTR_PROP_MAP[name] || name;
if (svgTags[element.tagName]) {
element.el.setAttribute(name, value);
}
else {
element.el[name] = value;
}
}
},
output: function (element, bindInfo, data) {
data.set(bindInfo.expr, element.el[bindInfo.name], {
target: {
id: element.id,
prop: bindInfo.name
}
});
}
};
var defaultElementPropHandlers = {
style: {
input: {
attr: function (element, name, value) {
if (value) {
return ' style="' + value + '"';
}
},
prop: function (element, name, value) {
element.el.style.cssText = value;
}
}
},
draggable: genBoolPropHandler('draggable'),
readonly: genBoolPropHandler('readonly'),
disabled: genBoolPropHandler('disabled')
};
function analInputCheckedState(element, value) {
var bindValue = element.props.get('value');
var bindType = element.props.get('type');
if (bindValue && bindType) {
switch (bindType.raw) {
case 'checkbox':
return contains(value, element.evalExpr(bindValue.expr));
case 'radio':
return value === element.evalExpr(bindValue.expr);
}
}
}
var elementPropHandlers = {
input: {
mutiple: genBoolPropHandler('mutiple'),
checked: {
input: {
attr: function (element, name, value) {
if (analInputCheckedState(element, value)) {
return ' checked="checked"';
}
},
prop: function (element, name, value) {
var checked = analInputCheckedState(element, value);
if (checked != null) {
element.el.checked = checked;
}
}
},
output: function (element, bindInfo, data) {
var el = element.el;
var bindType = element.props.get('type') || {};
switch (bindType.raw) {
case 'checkbox':
data[el.checked ? 'push' : 'remove'](bindInfo.expr, el.value);
break;
case 'radio':
el.checked && data.set(bindInfo.expr, el.value, {
target: {
id: element.id,
prop: bindInfo.name
}
});
break;
}
}
}
},
textarea: {
value: {
input: {
attr: empty,
prop: defaultElementPropHandler.input.prop
},
output: defaultElementPropHandler.output
}
},
option: {
value: {
input: {
attr: function (element, name, value) {
var attrStr = ' value="' + (value || '') + '"';
var parentSelect = element.parent;
while (parentSelect) {
if (parentSelect.tagName === 'select') {
break;
}
parentSelect = parentSelect.parent;
}
if (parentSelect) {
var selectValue = null;
var prop;
var expr;
if ((prop = parentSelect.props.get('value'))
&& (expr = prop.expr)
) {
selectValue = isComponent(parentSelect)
? evalExpr(expr, parentSelect.data, parentSelect)
: parentSelect.evalExpr(expr)
|| '';
}
if (selectValue === value) {
attrStr += ' selected';
}
}
return attrStr;
},
prop: defaultElementPropHandler.input.prop
}
}
},
select: {
value: {
input: {
attr: empty,
prop: function (element, name, value) {
element.el.value = value || '';
}
},
output: defaultElementPropHandler.output
}
}
};
/**
* 生成 bool 类型属性绑定操作的变换方法
*
* @inner
* @param {string} attrName 属性名
* @return {Object}
*/
function genBoolPropHandler(attrName) {
var attrLiteral = ' ' + attrName;
return {
input: {
attr: function (element, name, value) {
// 因为元素的attr值必须经过html escape,否则可能有漏洞
// 所以这里直接对假值字符串形式进行处理
// NaN之类非主流的就先不考虑了
if (element.props.get(name).raw === ''
|| value && value !== 'false' && value !== '0'
) {
return attrLiteral;
}
},
prop: function (element, name, value) {
var propName = HTML_ATTR_PROP_MAP[attrName] || attrName;
element.el[propName] = !!(value && value !== 'false' && value !== '0');
}
}
};
}
/**
* 获取属性处理对象
*
* @param {Element} element 元素实例
* @param {string} name 属性名
* @return {Object}
*/
function getPropHandler(element, name) {
var propHandlers = elementPropHandlers[element.tagName] || {};
return propHandlers[name] || defaultElementPropHandlers[name] || defaultElementPropHandler;
}
exports = module.exports = getPropHandler;
|
<filename>packages/form/src/widgets/tree-select/tree-select.widget.ts
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { NzFormatEmitEvent } from 'ng-zorro-antd/core/tree';
import { SFValue } from '../../interface';
import { SFSchemaEnum } from '../../schema';
import { getData, toBool } from '../../utils';
import { ControlUIWidget } from '../../widget';
import { SFTreeSelectWidgetSchema } from './schema';
@Component({
selector: 'sf-tree-select',
templateUrl: './tree-select.widget.html',
preserveWhitespaces: false,
encapsulation: ViewEncapsulation.None
})
export class TreeSelectWidget extends ControlUIWidget<SFTreeSelectWidgetSchema> implements OnInit {
i: SFTreeSelectWidgetSchema;
data: SFSchemaEnum[] = [];
asyncData = false;
ngOnInit(): void {
const { ui } = this;
this.i = {
allowClear: ui.allowClear,
showSearch: toBool(ui.showSearch, false),
dropdownMatchSelectWidth: toBool(ui.dropdownMatchSelectWidth, true),
multiple: toBool(ui.multiple, false),
checkable: toBool(ui.checkable, false),
showIcon: toBool(ui.showIcon, false),
showExpand: toBool(ui.showExpand, true),
showLine: toBool(ui.showLine, false),
checkStrictly: toBool(ui.checkStrictly, false),
hideUnMatched: toBool(ui.hideUnMatched, false),
defaultExpandAll: toBool(ui.defaultExpandAll, false),
displayWith: ui.displayWith || ((node: any) => node.title)
};
this.asyncData = typeof ui.expandChange === 'function';
}
reset(value: SFValue): void {
getData(this.schema, this.ui, value).subscribe(list => {
this.data = list;
this.detectChanges();
});
}
change(value: string[] | string): void {
if (this.ui.change) this.ui.change(value);
this.setValue(value);
}
expandChange(e: NzFormatEmitEvent): void {
const { ui } = this;
if (typeof ui.expandChange !== 'function') return;
ui.expandChange(e).subscribe(res => {
e.node!.clearChildren();
e.node!.addChildren(res);
this.detectChanges();
});
}
}
|
package com.littlejenny.gulimall.product.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.littlejenny.common.utils.PageUtils;
import com.littlejenny.gulimall.product.entity.BrandEntity;
import java.util.List;
import java.util.Map;
/**
* 品牌
*
* @author littlejenny
* @email <EMAIL>
* @date 2021-07-16 15:11:54
*/
public interface BrandService extends IService<BrandEntity> {
PageUtils queryPage(Map<String, Object> params);
void updateDetailByID(BrandEntity brand);
List<BrandEntity> getbyIds(List<Long> brandIds);
}
|
<gh_stars>1-10
import { IAction, IPlainAction } from 'shared/types/redux';
import { IChartItem, ILastPrice } from 'shared/types/models';
export interface IReduxState {
data: {
lastPrice: ILastPrice | null;
};
edit: {
// TODO this state presents at settings and should be removed
decimals: number | null;
};
}
export type ISetDecimals = IAction<'ORDER_BOOK:SET_DECIMALS', number>;
export type ISetLastPrice = IAction<'ORDER_BOOK:SET_LAST_PRICE', IChartItem | null>;
export type ISetDefaultDocumentTitle = IPlainAction<'ORDER_BOOK:SET_DEFAULT_DOCUMENT_TITLE'>;
export type Action = ISetDecimals | ISetLastPrice;
|
#!/bin/bash
# Copyright 2020 Google and DeepMind.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
REPO=$PWD
MODEL=${1:-bert-base-multilingual-cased}
GPU=${2:-0}
DATA_DIR=${3:-"$REPO/data_generalized_augment/"}
OUT_DIR=${4:-"$REPO/outputs/"}
MODEL_DIR=${5}
export CUDA_VISIBLE_DEVICES=$GPU
export OMP_NUM_THREADS=8
TASK='xnli'
LR=2e-5
EPOCH=1
MAXL=128
LANGS='en-en,en-es,en-de,en-fr,en-bg,en-ru,en-el,en-th,en-sw,en-vi,en-ar,en-zh,en-hi,en-ur,en-tr,es-en,es-es,es-de,es-fr,es-bg,es-ru,es-el,es-th,es-sw,es-vi,es-ar,es-zh,es-hi,es-ur,es-tr,de-en,de-es,de-de,de-fr,de-bg,de-ru,de-el,de-th,de-sw,de-vi,de-ar,de-zh,de-hi,de-ur,de-tr,fr-en,fr-es,fr-de,fr-fr,fr-bg,fr-ru,fr-el,fr-th,fr-sw,fr-vi,fr-ar,fr-zh,fr-hi,fr-ur,fr-tr,bg-en,bg-es,bg-de,bg-fr,bg-bg,bg-ru,bg-el,bg-th,bg-sw,bg-vi,bg-ar,bg-zh,bg-hi,bg-ur,bg-tr,ru-en,ru-es,ru-de,ru-fr,ru-bg,ru-ru,ru-el,ru-th,ru-sw,ru-vi,ru-ar,ru-zh,ru-hi,ru-ur,ru-tr,el-en,el-es,el-de,el-fr,el-bg,el-ru,el-el,el-th,el-sw,el-vi,el-ar,el-zh,el-hi,el-ur,el-tr,th-en,th-es,th-de,th-fr,th-bg,th-ru,th-el,th-th,th-sw,th-vi,th-ar,th-zh,th-hi,th-ur,th-tr,sw-en,sw-es,sw-de,sw-fr,sw-bg,sw-ru,sw-el,sw-th,sw-sw,sw-vi,sw-ar,sw-zh,sw-hi,sw-ur,sw-tr,vi-en,vi-es,vi-de,vi-fr,vi-bg,vi-ru,vi-el,vi-th,vi-sw,vi-vi,vi-ar,vi-zh,vi-hi,vi-ur,vi-tr,ar-en,ar-es,ar-de,ar-fr,ar-bg,ar-ru,ar-el,ar-th,ar-sw,ar-vi,ar-ar,ar-zh,ar-hi,ar-ur,ar-tr,zh-en,zh-es,zh-de,zh-fr,zh-bg,zh-ru,zh-el,zh-th,zh-sw,zh-vi,zh-ar,zh-zh,zh-hi,zh-ur,zh-tr,hi-en,hi-es,hi-de,hi-fr,hi-bg,hi-ru,hi-el,hi-th,hi-sw,hi-vi,hi-ar,hi-zh,hi-hi,hi-ur,hi-tr,ur-en,ur-es,ur-de,ur-fr,ur-bg,ur-ru,ur-el,ur-th,ur-sw,ur-vi,ur-ar,ur-zh,ur-hi,ur-ur,ur-tr,tr-en,tr-es,tr-de,tr-fr,tr-bg,tr-ru,tr-el,tr-th,tr-sw,tr-vi,tr-ar,tr-zh,tr-hi,tr-ur,tr-tr'
LC=""
if [ $MODEL == "bert-base-multilingual-cased" ] || [ $MODEL == "bert-base-multilingual-uncased" ]; then
MODEL_TYPE="bert"
elif [ $MODEL == "xlm-mlm-100-1280" ] || [ $MODEL == "xlm-mlm-tlm-xnli15-1024" ]; then
MODEL_TYPE="xlm"
LC=" --do_lower_case"
elif [ $MODEL == "xlm-roberta-large" ] || [ $MODEL == "xlm-roberta-base" ]; then
MODEL_TYPE="xlmr"
fi
if [ $MODEL == "xlm-mlm-100-1280" ] || [ $MODEL == "xlm-roberta-large" ]; then
BATCH_SIZE=2
GRAD_ACC=16
else
BATCH_SIZE=8
GRAD_ACC=4
fi
SAVE_DIR="${OUT_DIR}/${TASK}/${MODEL}-LR${LR}-epoch${EPOCH}-MaxLen${MAXL}/"
mkdir -p $SAVE_DIR
python $PWD/third_party/run_classify.py \
--model_type $MODEL_TYPE \
--model_name_or_path $MODEL \
--train_language en \
--task_name $TASK \
--do_predict \
--train_split train \
--test_split test \
--data_dir $DATA_DIR/$TASK \
--gradient_accumulation_steps $GRAD_ACC \
--per_gpu_train_batch_size $BATCH_SIZE \
--learning_rate $LR \
--num_train_epochs $EPOCH \
--max_seq_length $MAXL \
--output_dir $SAVE_DIR \
--eval_all_checkpoints \
--overwrite_output_dir \
--overwrite_cache \
--save_steps 500 \
--log_file 'train.log' \
--predict_languages $LANGS \
--save_only_best_checkpoint \
--eval_test_set $LC \
--init_checkpoint $MODEL_DIR
|
package result
import "github.com/nspcc-dev/neo-go/pkg/util"
// RawMempool represents a result of getrawmempool RPC call.
type RawMempool struct {
Height uint32 `json:"height"`
Verified []util.Uint256 `json:"verified"`
Unverified []util.Uint256 `json:"unverified"`
}
|
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# --------------------------------------------------------------------------------------------
set -ex
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
# Load all variables
source $REPO_DIR/build/__variables.sh
source $REPO_DIR/build/__functions.sh
source $REPO_DIR/build/__sdkStorageConstants.sh
source $REPO_DIR/build/__nodeVersions.sh
cd "$BUILD_IMAGES_BUILD_CONTEXT_DIR"
declare BUILD_SIGNED=""
# Check to see if the build is by scheduled ORYX-CI or other azure devops build
# SIGNTYPE is set to 'real' on the Oryx-CI build definition itself (not in yaml file)
if [ "$SIGNTYPE" == "real" ] || [ "$SIGNTYPE" == "Real" ]
then
# "SignType" will be real only for builds by scheduled and/or manual builds of ORYX-CI
BUILD_SIGNED="true"
else
# locally we need to fake "binaries" directory to get a successful "copybuildscriptbinaries" build stage
mkdir -p $BUILD_IMAGES_BUILD_CONTEXT_DIR/binaries
fi
# NOTE: We are using only one label here and put all information in it
# in order to limit the number of layers that are created
labelContent="git_commit=$GIT_COMMIT, build_number=$BUILD_NUMBER, release_tag_name=$RELEASE_TAG_NAME"
# https://medium.com/@Drew_Stokes/bash-argument-parsing-54f3b81a6a8f
PARAMS=""
while (( "$#" )); do
case "$1" in
-t|--type)
imageTypeToBuild=$2
shift 2
;;
--) # end argument parsing
shift
break
;;
-*|--*=) # unsupported flags
echo "Error: Unsupported flag $1" >&2
exit 1
;;
*) # preserve positional arguments
PARAMS="$PARAMS $1"
shift
;;
esac
done
# set positional arguments in their proper place
eval set -- "$PARAMS"
echo
echo "Image type to build is set to: $imageTypeToBuild"
declare -r supportFilesImageName="support-files-image-for-build"
function BuildAndTagStage()
{
local dockerFile="$1"
local stageName="$2"
local stageTagName="$ACR_PUBLIC_PREFIX/$2"
echo
echo "Building stage '$stageName' with tag '$stageTagName'..."
docker build \
--target $stageName \
-t $stageTagName \
-f "$dockerFile" \
.
}
# Create artifact dir & files
mkdir -p "$ARTIFACTS_DIR/images"
touch $ACR_BUILD_IMAGES_ARTIFACTS_FILE
> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
function createImageNameWithReleaseTag() {
local imageNameToBeTaggedUniquely="$1"
# Retag build image with build number tags
if [ "$AGENT_BUILD" == "true" ]
then
IFS=':' read -ra IMAGE_NAME <<< "$imageNameToBeTaggedUniquely"
local repo="${IMAGE_NAME[0]}"
local tag="$BUILD_DEFINITIONNAME.$RELEASE_TAG_NAME"
if [ ${#IMAGE_NAME[@]} -eq 2 ]; then
local uniqueImageName="$imageNameToBeTaggedUniquely-$tag"
else
local uniqueImageName="$repo:$tag"
fi
echo
echo "Retagging image '$imageNameToBeTaggedUniquely' as '$uniqueImageName'..."
docker tag "$imageNameToBeTaggedUniquely" "$uniqueImageName"
# Write image list to artifacts file
echo "$uniqueImageName" >> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
fi
}
function buildGitHubRunnersUbuntuBaseImage() {
echo
echo "----Building the image which uses GitHub runners' buildpackdeps-focal-scm specific digest----------"
docker build -t githubrunners-buildpackdeps-focal \
-f "$BUILD_IMAGES_GITHUB_RUNNERS_BUILDPACKDEPS_FOCAL_DOCKERFILE" \
.
}
function buildGitHubRunnersBusterBaseImage() {
echo
echo "----Building the image which uses GitHub runners' buildpackdeps-buster-scm specific digest----------"
docker build -t githubrunners-buildpackdeps-buster \
-f "$BUILD_IMAGES_GITHUB_RUNNERS_BUILDPACKDEPS_BUSTER_DOCKERFILE" \
.
}
function buildGitHubRunnersBaseImage() {
echo
echo "----Building the image which uses GitHub runners' buildpackdeps-stretch specific digest----------"
docker build -t githubrunners-buildpackdeps-stretch \
-f "$BUILD_IMAGES_GITHUB_RUNNERS_BUILDPACKDEPS_STRETCH_DOCKERFILE" \
.
}
function buildTemporaryFilesImage() {
buildGitHubRunnersBaseImage
buildGitHubRunnersBusterBaseImage
buildGitHubRunnersUbuntuBaseImage
# Create the following image so that it's contents can be copied to the rest of the images below
echo
echo "------Creating temporary files image-------"
docker build -t support-files-image-for-build \
-f "$BUILD_IMAGES_SUPPORT_FILES_DOCKERFILE" \
.
}
function buildBuildScriptGeneratorImage() {
buildTemporaryFilesImage
# Create the following image so that it's contents can be copied to the rest of the images below
echo
echo "-------------Creating build script generator image-------------------"
docker build -t buildscriptgenerator \
--build-arg AGENTBUILD=$BUILD_SIGNED \
--build-arg GIT_COMMIT=$GIT_COMMIT \
--build-arg BUILD_NUMBER=$BUILD_NUMBER \
--build-arg RELEASE_TAG_NAME=$RELEASE_TAG_NAME \
-f "$BUILD_IMAGES_BUILDSCRIPTGENERATOR_DOCKERFILE" \
.
}
function buildGitHubActionsImage() {
local debianFlavor=$1
local devImageTag=github-actions
local builtImageName="$ACR_BUILD_GITHUB_ACTIONS_IMAGE_NAME"
if [ -z "$debianFlavor" ] || [ "$debianFlavor" == "stretch" ]; then
debianFlavor="stretch"
echo "Debian Flavor is: "$debianFlavor
elif [ "$debianFlavor" == "buster" ]; then
debianFlavor="buster"
devImageTag=$devImageTag-$debianFlavor
echo "dev image tag: "$devImageTag
builtImageName=$builtImageName-$debianFlavor
echo "built image name: "$builtImageName
fi
buildBuildScriptGeneratorImage
echo
echo "-------------Creating build image for GitHub Actions-------------------"
docker build -t $builtImageName \
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
--build-arg DEBIAN_FLAVOR=$debianFlavor \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGES_GITHUB_ACTIONS_DOCKERFILE" \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
echo
docker tag $builtImageName $DEVBOX_BUILD_IMAGES_REPO:$devImageTag
docker build \
-t "$ORYXTESTS_BUILDIMAGE_REPO:$devImageTag" \
--build-arg PARENT_IMAGE_BASE=$devImageTag \
-f "$ORYXTESTS_GITHUB_ACTIONS_BUILDIMAGE_DOCKERFILE" \
.
}
function buildJamStackImage() {
local debianFlavor=$1
local devImageTag=azfunc-jamstack
local parentImageTag=github
local builtImageName="$ACR_AZURE_FUNCTIONS_JAMSTACK_IMAGE_NAME"
buildGitHubActionsImage $debianFlavor
if [ -z "$debianFlavor" ] || [ "$debianFlavor" == "stretch" ]; then
debianFlavor="stretch"
parentImageTag=actions
elif [ "$debianFlavor" == "buster" ]; then
debianFlavor="buster"
parentImageTag=actions-$debianFlavor
devImageTag=$devImageTag-$debianFlavor
echo "dev image tag: "$devImageTag
builtImageName=$builtImageName-$debianFlavor
echo "built image name: "$builtImageName
fi
# NOTE: do not pass in label as it is inherited from base image
# Also do not pass in build-args as they are used in base image for creating environment variables which are in
# turn inherited by this image.
echo
echo "-------------Creating AzureFunctions JamStack image-------------------"
docker build -t $builtImageName \
-f "$BUILD_IMAGES_AZ_FUNCS_JAMSTACK_DOCKERFILE" \
--build-arg PARENT_DEBIAN_FLAVOR=$parentImageTag \
--build-arg DEBIAN_FLAVOR=$debianFlavor \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
echo
docker tag $builtImageName $DEVBOX_BUILD_IMAGES_REPO:$devImageTag
}
function buildLtsVersionsImage() {
ltsBuildImageDockerFile=$BUILD_IMAGES_LTS_VERSIONS_DOCKERFILE
local debianFlavor=$1
local devImageTag=lts-versions
local builtImageName="$ACR_BUILD_LTS_VERSIONS_IMAGE_NAME"
local testImageName="$ORYXTESTS_BUILDIMAGE_REPO:lts-versions"
if [ -z "$debianFlavor" ] || [ "$debianFlavor" == "stretch" ]; then
echo "dev image tag: "$devImageTag
echo "built image name: "$builtImageName
else
devImageTag=$devImageTag-$debianFlavor
builtImageName=$builtImageName-$debianFlavor
ltsBuildImageDockerFile="$BUILD_IMAGES_LTS_VERSIONS_BUSTER_DOCKERFILE"
testImageName=$testImageName-buster
echo "dev image tag: "$devImageTag
echo "built image name: "$builtImageName
echo "test image name: "$testImageName
fi
buildBuildScriptGeneratorImage
buildGitHubRunnersBaseImage $debianFlavor
BuildAndTagStage "$ltsBuildImageDockerFile" intermediate
echo
echo "-------------Creating lts versions build image-------------------"
docker build -t $builtImageName \
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
--label com.microsoft.oryx="$labelContent" \
-f "$ltsBuildImageDockerFile" \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
echo
docker tag $builtImageName $DEVBOX_BUILD_IMAGES_REPO:$devImageTag
echo
echo "Building a base image for tests..."
# Do not write this image tag to the artifacts file as we do not intend to push it
docker build -t $testImageName \
--build-arg PARENT_IMAGE_BASE=$devImageTag \
-f "$ORYXTESTS_LTS_VERSIONS_BUILDIMAGE_DOCKERFILE" \
.
}
function buildFullImage() {
buildLtsVersionsImage
echo
echo "-------------Creating full build image-------------------"
local builtImageName="$ACR_BUILD_IMAGES_REPO"
# NOTE: do not pass in label as it is inherited from base image
# Also do not pass in build-args as they are used in base image for creating environment variables which are in
# turn inherited by this image.
docker build -t $builtImageName \
-f "$BUILD_IMAGES_DOCKERFILE" \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
echo
docker tag $builtImageName $DEVBOX_BUILD_IMAGES_REPO
echo
echo "Building a base image for tests..."
# Do not write this image tag to the artifacts file as we do not intend to push it
local testImageName="$ORYXTESTS_BUILDIMAGE_REPO"
docker build -t $testImageName \
-f "$ORYXTESTS_BUILDIMAGE_DOCKERFILE" \
.
}
function buildVsoFocalImage() {
buildBuildScriptGeneratorImage
buildGitHubRunnersUbuntuBaseImage
BuildAndTagStage "$BUILD_IMAGES_VSO_FOCAL_DOCKERFILE" intermediate
echo
echo "-------------Creating VSO focal build image-------------------"
local builtImageName="$ACR_BUILD_VSO_FOCAL_IMAGE_NAME"
docker build -t $builtImageName \
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGES_VSO_FOCAL_DOCKERFILE" \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
docker tag $builtImageName "$DEVBOX_BUILD_IMAGES_REPO:vso-focal"
echo
echo "$builtImageName" >> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
}
function buildVsoSlimImage() {
buildBuildScriptGeneratorImage
buildGitHubRunnersUbuntuBaseImage
BuildAndTagStage "$BUILD_IMAGES_VSO_SLIM_DOCKERFILE" intermediate
echo
echo "-------------Creating Slim VSO focal build image-------------------"
local builtImageName="$ACR_BUILD_VSO_SLIM_IMAGE_NAME"
docker build -t $builtImageName \
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGES_VSO_SLIM_DOCKERFILE" \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
docker tag $builtImageName "$DEVBOX_BUILD_IMAGES_REPO:vso-slim"
echo
echo "$builtImageName" >> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
}
function buildCliImage() {
buildBuildScriptGeneratorImage
local debianFlavor=$1
local devImageTag=cli
local builtImageName="$ACR_CLI_BUILD_IMAGE_REPO"
if [ -z "$debianFlavor" ] || [ "$debianFlavor" == "stretch" ]; then
debianFlavor="stretch"
elif [ "$debianFlavor" == "buster" ]; then
debianFlavor="buster"
devImageTag=$devImageTag-$debianFlavor
echo "dev image tag: "$devImageTag
builtImageName=$builtImageName-$debianFlavor
echo "built image name: "$builtImageName
fi
echo
echo "-------------Creating CLI image-------------------"
docker build -t $builtImageName \
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
--build-arg DEBIAN_FLAVOR=$debianFlavor \
--label com.microsoft.oryx="$labelContent" \
-f "$BUILD_IMAGES_CLI_DOCKERFILE" \
.
createImageNameWithReleaseTag $builtImageName
echo
echo "$builtImageName image history"
docker history $builtImageName
docker tag $builtImageName "$DEVBOX_BUILD_IMAGES_REPO:$devImageTag"
echo
echo "$builtImageName" >> $ACR_BUILD_IMAGES_ARTIFACTS_FILE
}
function buildBuildPackImage() {
# Build buildpack images
# 'pack create-builder' is not supported on Windows
if [[ "$OSTYPE" == "linux-gnu" ]] || [[ "$OSTYPE" == "darwin"* ]]; then
source $REPO_DIR/build/buildBuildpacksImages.sh
else
echo
echo "Skipping building Buildpacks images as platform '$OSTYPE' is not supported."
fi
}
if [ -z "$imageTypeToBuild" ]; then
buildGitHubActionsImage "buster"
buildGitHubActionsImage
buildJamStackImage "buster"
buildJamStackImage
buildLtsVersionsImage "buster"
buildLtsVersionsImage
buildFullImage
buildVsoSlimImage
buildVsoFocalImage
buildCliImage "buster"
buildCliImage
buildBuildPackImage
elif [ "$imageTypeToBuild" == "githubactions" ]; then
buildGitHubActionsImage
elif [ "$imageTypeToBuild" == "githubactions-buster" ]; then
buildGitHubActionsImage "buster"
elif [ "$imageTypeToBuild" == "jamstack-buster" ]; then
buildJamStackImage "buster"
elif [ "$imageTypeToBuild" == "jamstack" ]; then
buildJamStackImage
elif [ "$imageTypeToBuild" == "ltsversions" ]; then
buildLtsVersionsImage
elif [ "$imageTypeToBuild" == "ltsversions-buster" ]; then
buildLtsVersionsImage "buster"
elif [ "$imageTypeToBuild" == "full" ]; then
buildFullImage
elif [ "$imageTypeToBuild" == "vso-slim" ]; then
buildVsoSlimImage
elif [ "$imageTypeToBuild" == "vso-focal" ]; then
buildVsoFocalImage
elif [ "$imageTypeToBuild" == "cli" ]; then
buildCliImage
elif [ "$imageTypeToBuild" == "cli-buster" ]; then
buildCliImage "buster"
elif [ "$imageTypeToBuild" == "buildpack" ]; then
buildBuildPackImage
else
echo "Error: Invalid value for '--type' switch. Valid values are: \
githubactions, jamstack, ltsversions, full, vso-slim, vso-focal, cli, buildpack"
exit 1
fi
echo
echo "List of images tagged (from '$ACR_BUILD_IMAGES_ARTIFACTS_FILE'):"
cat $ACR_BUILD_IMAGES_ARTIFACTS_FILE
echo
showDockerImageSizes
echo
dockerCleanupIfRequested
if [ -z "$BUILD_SIGNED" ]
then
rm -rf binaries
fi |
<gh_stars>0
import { useStaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
import React, { useEffect } from "react"
import { ExtraImageProps } from "../../../../../types/shared"
const alt = {
visit: "Arashiyama Visit",
visit2: "Arashiyama Visit",
visit3: "Arashiyama Visit",
street: "Arashiyama Street",
street2: "Arashiyama Street",
street3: "Arashiyama Street",
street4: "Arashiyama Street",
street5: "Arashiyama Street",
street6: "Arashiyama Street",
street7: "Arashiyama Street",
street8: "Arashiyama Street",
street9: "Arashiyama Street",
street10: "Arashiyama Street",
street11: "Arashiyama Street",
bamboo: "Arashiyama Bamboo Forest",
bamboo2: "Arashiyama Bamboo Forest",
bamboo3: "Arashiyama Bamboo Forest",
bamboo4: "Arashiyama Bamboo Forest",
bamboo5: "Arashiyama Bamboo Forest",
bamboo6: "Arashiyama Bamboo Forest",
bamboo7: "Arashiyama Bamboo Forest",
bamboo8: "Arashiyama Bamboo Forest",
bamboo9: "Arashiyama Bamboo Forest",
bamboo10: "Arashiyama Bamboo Forest",
bamboo11: "Arashiyama Bamboo Forest",
bamboo12: "Arashiyama Bamboo Forest",
bamboo13: "Arashiyama Bamboo Forest",
bamboo14: "Arashiyama Bamboo Forest",
bamboo15: "Arashiyama Bamboo Forest",
monkey: "Arashiyama Monkey",
kimono: "Arashiyama Kimono Forest",
cardFr1: "Arashiyama Pinterest card",
cardFr2: "Arashiyama Pinterest card",
cardEn1: "Arashiyama Pinterest card",
cardEn2: "Arashiyama Pinterest card",
}
export const ArashiyamaImages: React.FunctionComponent<ExtraImageProps & { image: keyof typeof alt }> = ({
className = "",
image,
fluidObject = {},
imgStyle = {},
onLoad,
}) => {
const data = useStaticQuery(graphql`
query {
visit: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-visit.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
visit2: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-visit2.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 50, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
visit3: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-visit3.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street2: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street2.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street3: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street3.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street4: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street4.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street5: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street5.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street6: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street6.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street7: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street7.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street8: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street8.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street9: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street9.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street10: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street10.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
street11: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-street11.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 80, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo2: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo2.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo3: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo3.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo4: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo4.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo5: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo5.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo6: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo6.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo7: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo7.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo8: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo8.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo9: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo9.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo10: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo10.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo11: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo11.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 90, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo12: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo12.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo13: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo13.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo14: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo14.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
bamboo15: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-bamboo15.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
monkey: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-monkey.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
kimono: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/arashiyama-kimono.jpg" }) {
childImageSharp {
fluid(maxWidth: 1200, quality: 60, srcSetBreakpoints: [600]) {
...GatsbyImageSharpFluid
}
}
}
cardFr1: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/card-fr1.jpg" }) {
childImageSharp {
fluid(maxWidth: 1000, quality: 60, srcSetBreakpoints: [1000]) {
...GatsbyImageSharpFluid
}
}
}
cardFr2: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/card-fr2.jpg" }) {
childImageSharp {
fluid(maxWidth: 1000, quality: 60, srcSetBreakpoints: [1000]) {
...GatsbyImageSharpFluid
}
}
}
cardEn1: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/card-en1.jpg" }) {
childImageSharp {
fluid(maxWidth: 1000, quality: 60, srcSetBreakpoints: [1000]) {
...GatsbyImageSharpFluid
}
}
}
cardEn2: file(relativePath: { eq: "asia/japan/kyoto/arashiyama/card-en2.jpg" }) {
childImageSharp {
fluid(maxWidth: 1000, quality: 60, srcSetBreakpoints: [1000]) {
...GatsbyImageSharpFluid
}
}
}
}
`)
useEffect(() => {
if (onLoad) onLoad(data[image].childImageSharp.fluid.src)
}, [data, image, onLoad])
return (
<Img
fluid={{ ...data[image].childImageSharp.fluid, ...fluidObject }}
alt={alt[image]}
className={className}
imgStyle={imgStyle}
/>
)
}
|
#! /usr/bin/sh
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
# This script invokes /usr/bin/file with -h option by default and
# turns off -h when passed with -L option.
CFLAG=
FFLAG=
MFLAG=
HFLAG=-h
USAGE="usage: file [-cL] [-f ffile] [-m mfile] file..."
while getopts cLf:m: opt
do
case $opt in
c) CFLAG=-$opt;;
L) HFLAG= ;;
m) MFLAG=-$opt; MARG=$OPTARG;;
f) FFLAG=-$opt; FARG=$OPTARG;;
\?) echo $USAGE;
exit 1;;
esac
done
shift `expr $OPTIND - 1`
exec /usr/bin/file $HFLAG $CFLAG $MFLAG $MARG $FFLAG $FARG "$@"
|
package com.siyuan.enjoyreading.ui.fragment;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import com.androidapp.banner.Banner;
import com.androidapp.pagedgridview.PagedGridItem;
import com.androidapp.pagedgridview.PagedGridLayout;
import com.androidapp.smartrefresh.layout.api.RefreshLayout;
import com.androidapp.smartrefresh.layout.listener.OnLoadMoreListener;
import com.androidapp.smartrefresh.layout.listener.OnRefreshListener;
import com.androidapp.widget.LoadingLayout;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.siyuan.enjoyreading.R;
import com.siyuan.enjoyreading.adapter.MultipleItemQuickAdapter;
import com.siyuan.enjoyreading.api.ApiConfig;
import com.siyuan.enjoyreading.entity.OrderMovie;
import com.siyuan.enjoyreading.ui.activity.knwoledge.KnowledgeChapterActivity;
import com.siyuan.enjoyreading.ui.fragment.base.ViewPagerBaseFragment;
import com.siyuan.enjoyreading.util.BannerUtil;
import com.siyuan.enjoyreading.widget.HeaderView;
import java.util.ArrayList;
import java.util.List;
public class OrderFragment extends ViewPagerBaseFragment {
final List<OrderMovie> movies = new Gson().fromJson(ApiConfig.JSON_MOVIES, new TypeToken<ArrayList<OrderMovie>>() {
}.getType());
private MultipleItemQuickAdapter mAdapter;
private LoadingLayout mLoadingLayout;
@Override
protected void loadData(boolean force) {
mLoadingLayout.showContent();
mAdapter.replaceData(movies);
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.e("", "------loadData---onCreate-----" + getUserVisibleHint());
}
@Override
public void onResume() {
super.onResume();
Log.e("", "------loadData---onResume-----" + getUserVisibleHint());
}
@Override
protected void initView(View view, Bundle savedInstanceState) {
Log.e("", "------loadData----mAdapter----");
mLoadingLayout = view.findViewById(com.androidapp.base.R.id.loading);
final RecyclerView recyclerView = view.findViewById(R.id.recyclerView);
final RefreshLayout refreshLayout = view.findViewById(R.id.refreshLayout);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
if (mAdapter == null) {
Log.e("", "------loadData----mAdapter---1111-");
mAdapter = new MultipleItemQuickAdapter();
PagedGridLayout pagedGridLayout = new PagedGridLayout(getActivity(), new PagedGridLayout.OnGridItemClick() {
@Override
public void onGridItemClick(Object item) {
mContext.startActivity(KnowledgeChapterActivity.getIntent(mContext));
}
});
final GriedViewItem item = new GriedViewItem();
item.setTitle("健身");
item.setIcon_url("http://cdn.code.lianyouapp.com/static/service/bcategory/8@3x.png");
List<GriedViewItem> list = new ArrayList<GriedViewItem>(){{
add(item);
add(item);
add(item);
add(item);
add(item);
add(item);
add(item);
add(item);
}};
pagedGridLayout.setEnableBigItem(true);
pagedGridLayout.setData(list, 5, 2);
Banner banner = BannerUtil.getBannerView(getContext(), ApiConfig.BANNER_ITEMS, recyclerView, false);
mAdapter.addHeaderView(banner, 0);
HeaderView categoryHeader = new HeaderView(getContext());
categoryHeader.setTitle("热点专栏");
mAdapter.addHeaderView(categoryHeader, 1);
mAdapter.addHeaderView(pagedGridLayout, 2);
HeaderView recommendHeader = new HeaderView(getContext());
recommendHeader.setTitle("精品推荐");
recommendHeader.setRightViewVisible(false);
mAdapter.addHeaderView(recommendHeader, 3);
mAdapter.openLoadAnimation();
}
recyclerView.setAdapter(mAdapter);
refreshLayout.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull final RefreshLayout refreshLayout) {
refreshLayout.getLayout().postDelayed(new Runnable() {
@Override
public void run() {
if (mAdapter.getItemCount() < 2) {
List<OrderMovie> movies = new Gson().fromJson(ApiConfig.JSON_MOVIES, new TypeToken<ArrayList<OrderMovie>>() {
}.getType());
mAdapter.replaceData(movies);
}
refreshLayout.finishRefresh();
}
}, 8000);
}
});
refreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
mAdapter.addData(movies);
refreshLayout.finishLoadMoreWithNoMoreData();
}
});
}
@Override
protected int getLayoutId() {
return R.layout.fragment_list_layout;
}
class GriedViewItem extends PagedGridItem {
}
}
|
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AuthGuard } from '@auth0/auth0-angular';
import { HomeComponent } from './Components/home/home.component';
import { LandingComponent } from './Components/landing/landing.component';
import { PharmacyComponent } from './Components/pharmacy/pharmacy.component';
const routes: Routes = [
{path: '', component: LandingComponent},
{path: 'home', component: HomeComponent, canActivate: [AuthGuard]},
{path: 'pharmacy', component: PharmacyComponent}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.