using System; using System.Collections.Generic; using System.ComponentModel; using GitHub.DistributedTask.Pipelines.Artifacts; using GitHub.DistributedTask.WebApi; namespace GitHub.DistributedTask.Pipelines { public interface IBuildStore : IStepProvider { void Add(BuildResource resource); void Add(IEnumerable resources); BuildResource Get(String alias); IEnumerable GetAll(); IArtifactResolver Resolver { get; } } public interface IContainerStore { void Add(ContainerResource resource); void Add(IEnumerable resources); ContainerResource Get(String alias); IEnumerable GetAll(); } public interface IPipelineStore : IStepProvider { void Add(PipelineResource resource); void Add(IEnumerable resources); PipelineResource Get(String alias); IEnumerable GetAll(); } public interface IRepositoryStore : IStepProvider { void Add(RepositoryResource resource); void Add(IEnumerable resources); RepositoryResource Get(String alias); IEnumerable GetAll(); } [EditorBrowsable(EditorBrowsableState.Never)] public interface IResourceStore : IStepProvider { IBuildStore Builds { get; } IContainerStore Containers { get; } IServiceEndpointStore Endpoints { get; } ISecureFileStore Files { get; } IEnvironmentStore Environments { get; } IPipelineStore Pipelines { get; } IAgentQueueStore Queues { get; } IAgentPoolStore Pools { get; } IRepositoryStore Repositories { get; } IVariableGroupStore VariableGroups { get; } PipelineResources GetAuthorizedResources(); ServiceEndpoint GetEndpoint(Guid endpointId); ServiceEndpoint GetEndpoint(String endpointId); SecureFile GetFile(Guid fileId); SecureFile GetFile(String fileId); TaskAgentQueue GetQueue(Int32 queueId); TaskAgentQueue GetQueue(String queueId); TaskAgentPool GetPool(Int32 poolId); TaskAgentPool GetPool(String poolName); VariableGroup GetVariableGroup(Int32 groupId); VariableGroup GetVariableGroup(String groupId); } }